lib/api_client/base.rb in api_client-0.1.7 vs lib/api_client/base.rb in api_client-0.1.8
- old
+ new
@@ -41,10 +41,16 @@
def id
self['id']
end
def inspect
- "#<#{self.class} id: #{self.id}>"
+ attributes = []
+ attr_keys = self.keys - ['id']
+ attributes.push "id: #{self.id}" if self.id
+ attr_keys.each do |key|
+ attributes.push("#{key}: #{self[key].inspect}")
+ end
+ "#<#{self.class} #{attributes.join(', ')}>"
end
end
end