Skip to content

Instantly share code, notes, and snippets.

@pointcom
Last active January 2, 2018 13:46
Show Gist options
  • Save pointcom/bdbf29dd80c92388ec97c8f650df584a to your computer and use it in GitHub Desktop.
Save pointcom/bdbf29dd80c92388ec97c8f650df584a to your computer and use it in GitHub Desktop.
Ruby 2.5
Customer = Struct.new(:name, :address, keyword_init: true)
Customer.new(name: "Dave", address: "123 Main")
#=> #<struct Customer name="Dave", address="123 Main">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment