Skip to content

Instantly share code, notes, and snippets.

@julienXX
Last active December 11, 2015 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julienXX/4606188 to your computer and use it in GitHub Desktop.
Save julienXX/4606188 to your computer and use it in GitHub Desktop.
WallInfo = Struct.new(:api_key, :params)
wall = ["apikey", {page_id: 4, token: "token", server: "factory"}]
info = WallInfo.new(*wall)
info.api_key = "api_key"
info.params = {page_id: 4, token: "token", server: "factory"}
much better than info.first or info[0]...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment