lib/structure_mapper.rb in structure_mapper-0.0.1 vs lib/structure_mapper.rb in structure_mapper-0.0.2

- old
+ new

@@ -64,9 +64,18 @@ (self.class.attributes || []).map do |name, _| public_send(name).to_structure end end + def == other + return false unless self.class == other.class + self.class.attributes.each do |name,_| + return false unless self.send(name) == other.send(name) + end + true + end + + module ClassMethods attr_reader :attributes def attribute options