Exception: Measurement::NoUnitFoundException
- Inherits:
-
Exception
- Object
- Exception
- Measurement::NoUnitFoundException
- Defined in:
- lib/measurement.rb
Instance Attribute Summary collapse
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(unit) ⇒ NoUnitFoundException
constructor
A new instance of NoUnitFoundException.
- #to_s ⇒ Object
Constructor Details
#initialize(unit) ⇒ NoUnitFoundException
Returns a new instance of NoUnitFoundException.
8 9 10 11 |
# File 'lib/measurement.rb', line 8 def initialize(unit) @unit = unit super end |
Instance Attribute Details
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
6 7 8 |
# File 'lib/measurement.rb', line 6 def unit @unit end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/measurement.rb', line 13 def to_s "No unit found: #{@unit}" end |