Class: Aruba::Matchers::ObjectFormatter::DelegatingInspector
- Inherits:
-
Struct
- Object
- Struct
- Aruba::Matchers::ObjectFormatter::DelegatingInspector
- Defined in:
- lib/aruba/matchers/base/object_formatter.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object
99 100 101 |
# File 'lib/aruba/matchers/base/object_formatter.rb', line 99 def object @object end |
Instance Method Details
#inspect ⇒ Object
100 101 102 103 104 105 106 |
# File 'lib/aruba/matchers/base/object_formatter.rb', line 100 def inspect if defined?(::Delegator) && ::Delegator === object "#<#{object.class}(#{ObjectFormatter.format(object.__getobj__)})>" else object.inspect end end |
#pretty_print(pp) ⇒ Object
108 109 110 |
# File 'lib/aruba/matchers/base/object_formatter.rb', line 108 def pretty_print(pp) pp.text inspect end |