lib/osm/badge.rb in osm-0.3.0 vs lib/osm/badge.rb in osm-0.4.0
- old
+ new
@@ -187,10 +187,14 @@
result = self.badge <=> another.try(:badge)
result = self.field <=> another.try(:field) if result == 0
return result
end
+ def inspect
+ Osm.inspect_instance(self, options={:replace_with => {'badge' => :osm_key}})
+ end
+
end # Class Requirement
class Data
include ::ActiveAttr::MassAssignmentSecurity
@@ -314,9 +318,13 @@
def <=>(another)
result = self.badge <=> another.try(:badge)
result = self.section_id <=> another.try(:section_id) if result == 0
result = self.member_id <=> another.try(:member_id) if result == 0
return result
+ end
+
+ def inspect
+ Osm.inspect_instance(self, options={:replace_with => {'badge' => :osm_key}})
end
end # Class Data
end # Class Badge