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.
1885 1886 1887 1888 |
# File 'lib/test/unit/assertions.rb', line 1885 def initialize(numeric, inspected_objects) @inspected_objects = inspected_objects @numeric = numeric end |
Class Method Details
.target?(object) ⇒ Boolean
1880 1881 1882 |
# File 'lib/test/unit/assertions.rb', line 1880 def target?(object) object.is_a?(Numeric) end |
Instance Method Details
#inspect ⇒ Object
1890 1891 1892 |
# File 'lib/test/unit/assertions.rb', line 1890 def inspect @numeric.to_s end |
#pretty_print(q) ⇒ Object
1894 1895 1896 |
# File 'lib/test/unit/assertions.rb', line 1894 def pretty_print(q) q.text(@numeric.to_s) end |
#pretty_print_cycle(q) ⇒ Object
1898 1899 1900 |
# File 'lib/test/unit/assertions.rb', line 1898 def pretty_print_cycle(q) q.text(@numeric.to_s) end |