# File lib/core/facets/object/object_state.rb, line 68 def object_state(data=nil) if data data.each_pair {|k,v| send(k.to_s + "=", v)} else data = {} each_pair{|k,v| data[k] = v} data end end
Struct#replace can take any source that responds to each_pair.
# File lib/core/facets/object/replace.rb, line 39 def replace(source) source.each_pair{ |k,v| send(k.to_s + "=", v) } end
Returns a hash containing the names and values for all instance settings in the Struct.
# File lib/core/facets/to_hash.rb, line 329 def to_h h = {} each_pair{ |k,v| h[k] = v } h end
Generated with the Darkfish Rdoc Generator 2.