Create a gist now

Instantly share code, notes, and snippets.

Struct.new
class Person < Struct.new(:name, :age)
def to_s
"#{name} is #{age} years old"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment