diff --git a/lib/user_agent.rb b/lib/user_agent.rb index 00e61da..f2b6486 100644 --- a/lib/user_agent.rb +++ b/lib/user_agent.rb @@ -173,7 +173,11 @@ def to_s end def inspect - "#" + attributes_as_nice_string = AttributesForInspect.map do |name| + "#{name}: #{send(name).inspect}" + end.join(', ') + + "#<#{self.class}: #{attributes_as_nice_string}>" end def eql?(other)