Returns a hash containing the names and values for all instance variables in the Struct.
[Source]
# File lib/core/facets/struct/attributes.rb, line 4 def attributes h = {} each_pair { |k,v| h[k] = v } h end
# File lib/more/facets/snapshot.rb, line 205 def restore_snapshot(snap) snap.each_pair {|k,v| send(k.to_s + "=", v)} end
# File lib/more/facets/snapshot.rb, line 199 def take_snapshot snap = Hash.new each_pair {|k,v| snap[k] = v} snap end
[Validate]