Interactive Ruby Shell: Difference between revisions

Content deleted Content added
version update
Syntax and use: Cat.new.meow should not include a description of the situation in which the cat meows, but the actual meow.
Tag: possible vandalism
Line 42:
irb(main):001:0> class Cat
irb(main):002:1> def meow
irb(main):003:2> puts 'The cat meows.Meow!'
irb(main):004:2> end
irb(main):005:1> end
Line 48:
 
irb(main):006:0> Cat.new.meow
Meow!
The cat meows.
 
</syntaxhighlight>