Class: Test::Unit::Assertions::AssertionMessage::NumericInspector
- Inherits:
-
Object
- Object
- Test::Unit::Assertions::AssertionMessage::NumericInspector
- Defined in:
- lib/test/unit/assertions.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(numeric, inspected_objects) ⇒ NumericInspector
constructor
A new instance of NumericInspector.
- #inspect ⇒ Object
- #pretty_print(q) ⇒ Object
- #pretty_print_cycle(q) ⇒ Object
Constructor Details
#initialize(numeric, inspected_objects) ⇒ NumericInspector
Returns a new instance of NumericInspector.
2163 2164 2165 2166 |
# File 'lib/test/unit/assertions.rb', line 2163 def initialize(numeric, inspected_objects) @inspected_objects = inspected_objects @numeric = numeric end |
Class Method Details
.target?(object) ⇒ Boolean
2158 2159 2160 |
# File 'lib/test/unit/assertions.rb', line 2158 def target?(object) object.is_a?(Numeric) end |
Instance Method Details
#inspect ⇒ Object
2168 2169 2170 |
# File 'lib/test/unit/assertions.rb', line 2168 def inspect @numeric.to_s end |
#pretty_print(q) ⇒ Object
2172 2173 2174 |
# File 'lib/test/unit/assertions.rb', line 2172 def pretty_print(q) q.text(@numeric.to_s) end |
#pretty_print_cycle(q) ⇒ Object
2176 2177 2178 |
# File 'lib/test/unit/assertions.rb', line 2176 def pretty_print_cycle(q) q.text(@numeric.to_s) end |