lib/seam/resources/base_resource.rb in seamapi-0.0.1 vs lib/seam/resources/base_resource.rb in seamapi-0.0.2
- old
+ new
@@ -25,7 +25,16 @@
data.map { |d| new(d, client) }
else
new(data, client)
end
end
+
+ def inspect
+ "<#{self.class.name}:#{"0x00%x" % (object_id << 1)}\n" + # rubocop:disable Style/StringConcatenation, Style/FormatString
+ instance_variables
+ .map { |k| k.to_s.sub("@", "") }
+ .filter { |k| k != "data" and k != "client" and respond_to? k }
+ .map { |k| " #{k}=#{send(k).inspect}" }
+ .join("\n") + ">"
+ end
end
end