Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created April 30, 2014 23:26
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 j-mcnally/05a75adcfa6fd2ab1819 to your computer and use it in GitHub Desktop.
Save j-mcnally/05a75adcfa6fd2ab1819 to your computer and use it in GitHub Desktop.
irb(main):005:0> require 'ostruct'
=> true
irb(main):006:0> t = OpenStruct.new({:test => "yolo"})
=> #<OpenStruct test="yolo">
irb(main):007:0> t.to_hash
=> nil
irb(main):008:0> t.to_h
=> {:test=>"yolo"}
irb(main):009:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment