default.txt 177 B

12345678910111213
  1. # The Greeter class
  2. class Greeter
  3. def initialize(name)
  4. @name = name.capitalize
  5. end
  6. def salute
  7. puts "Hello #{@name}!"
  8. end
  9. end
  10. g = Greeter.new("world")
  11. g.salute