Flowdock
marshal_dump() public

Provides marshalling support for use by the Marshal library. Returning the underlying Hash table that contains the functions defined as the keys and the values assigned to them.

require 'ostruct'

person = OpenStruct.new
person.name = 'John Smith'
person.age  = 70

person.marshal_dump # => { :name => 'John Smith', :age => 70 }
Show source
Register or log in to add new notes.