module MarkMapper::Plugins::Dumpable
Constants
- DUMP_BLACKLIST
Public Instance Methods
marshal_dump()
click to toggle source
# File lib/mark_mapper/plugins/dumpable.rb, line 8 def marshal_dump instance_variables.map(&:to_sym).inject({}) do |h, var| h[var] = instance_variable_get(var) unless DUMP_BLACKLIST.include?(var) or var.to_s.start_with?("@__") h end end
marshal_load(data)
click to toggle source
# File lib/mark_mapper/plugins/dumpable.rb, line 15 def marshal_load(data) data.each do |k, v| instance_variable_set(k, v) end end