Skip to content

Instantly share code, notes, and snippets.

@Insood
Created October 26, 2018 19:50
Show Gist options
  • Save Insood/20d66495ee37524f2dd76fed387097f9 to your computer and use it in GitHub Desktop.
Save Insood/20d66495ee37524f2dd76fed387097f9 to your computer and use it in GitHub Desktop.
s = Struct.new(:a,:b,:c)
a = [1,2,3]
b = s.new(*a)
puts b.a
puts b.b
puts b.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment