♦️Ruby Syntax

Describe about Ruby language syntax

Print


# Print with new line
puts "Hello world"

# Print without new line
print "hello"

# Can use 'p' as 'puts'
p "Hello world" 

Comment

# use # for comment one line
# use =begin and =end for comment multiple line

=begin 
    This is an exmaple.
    For comment multiple line.
=end

Variable Type

*** Method ***

String Method

Integer Method

Show All methods of object

Create Object

Create Class

Condition

Loop

Method

Array

Inherit Class

Module

Exception

Last updated