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.
1853 1854 1855 1856 |
# File 'lib/test/unit/assertions.rb', line 1853 def initialize(numeric, inspected_objects) @inspected_objects = inspected_objects @numeric = numeric end |
Class Method Details
.target?(object) ⇒ Boolean
1848 1849 1850 |
# File 'lib/test/unit/assertions.rb', line 1848 def target?(object) object.is_a?(Numeric) end |
Instance Method Details
#inspect ⇒ Object
1858 1859 1860 |
# File 'lib/test/unit/assertions.rb', line 1858 def inspect @numeric.to_s end |
#pretty_print(q) ⇒ Object
1862 1863 1864 |
# File 'lib/test/unit/assertions.rb', line 1862 def pretty_print(q) q.text(@numeric.to_s) end |
#pretty_print_cycle(q) ⇒ Object
1866 1867 1868 |
# File 'lib/test/unit/assertions.rb', line 1866 def pretty_print_cycle(q) q.text(@numeric.to_s) end |