Customizing a structure class

suggest change
Person = Struct.new :name do
  def greet(someone)
    "Hello #{someone}! I am #{name}!"
  end
end

Person.new('Alice').greet 'Bob'
# => "Hello Bob! I am Alice!"

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents