Exception: Measured::UnitAlreadyAdded

Inherits:
UnitError
  • Object
show all
Defined in:
lib/measured/unit_already_added.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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