Exception: Measured::UnitAlreadyAdded
- Defined in:
- lib/measured/unit_already_added.rb
Instance Attribute Summary collapse
-
#unit_name ⇒ Object
readonly
Returns the value of attribute unit_name.
Instance Method Summary collapse
-
#initialize(unit_name) ⇒ UnitAlreadyAdded
constructor
A new instance of UnitAlreadyAdded.
Constructor Details
#initialize(unit_name) ⇒ UnitAlreadyAdded
Returns a new instance of UnitAlreadyAdded.
6 7 8 9 |
# File 'lib/measured/unit_already_added.rb', line 6 def initialize(unit_name) super("Unit #{unit_name} has already been added.") @unit_name = unit_name end |
Instance Attribute Details
#unit_name ⇒ Object (readonly)
Returns the value of attribute unit_name.
4 5 6 |
# File 'lib/measured/unit_already_added.rb', line 4 def unit_name @unit_name end |