Module: ActiveGraph::Shared::Marshal
- Extended by:
- ActiveSupport::Concern
- Included in:
- Node, Relationship
- Defined in:
- lib/active_graph/shared/marshal.rb
Instance Method Summary collapse
Instance Method Details
#marshal_dump ⇒ Object
6 7 8 |
# File 'lib/active_graph/shared/marshal.rb', line 6 def marshal_dump marshal_instance_variables.map(&method(:instance_variable_get)) end |
#marshal_load(array) ⇒ Object
10 11 12 13 14 |
# File 'lib/active_graph/shared/marshal.rb', line 10 def marshal_load(array) marshal_instance_variables.zip(array).each do |var, value| instance_variable_set(var, value) end end |