Skip to content

Instantly share code, notes, and snippets.

@keesun
Created March 8, 2012 00:24
Show Gist options
  • Select an option

  • Save keesun/1997538 to your computer and use it in GitHub Desktop.

Select an option

Save keesun/1997538 to your computer and use it in GitHub Desktop.
[BoR] chapter 1
s = 'Keesun';
puts "Hello #{s}, #{2000 + 12}"
if(true) then
puts "Puss int the Boots"
end
class Company
$founder = "Toby"
def initialize(name)
@name = name;
end
def set_name(name)
@name = name
end
def get_name
@name
end
#def to_s
# "name: #{@name}"
#end
def show
employee = "Keesun"
puts "The founder is #{$founder}. and one employee is #{employee}"
end
end
epril = Company.new("Epril'")
puts epril.get_name
puts epril
puts epril.inspect
p(epril)
epril.show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment