Class: Stick::Units::Converter::Conversion
- Inherits:
-
Struct
- Object
- Struct
- Stick::Units::Converter::Conversion
- Defined in:
- lib/stick/units/base.rb,
lib/stick/units/base.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#multiplier ⇒ Object
Returns the value of attribute multiplier.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
Instance Attribute Details
#multiplier ⇒ Object
Returns the value of attribute multiplier
641 642 643 |
# File 'lib/stick/units/base.rb', line 641 def multiplier @multiplier end |
#units ⇒ Object
Returns the value of attribute units
641 642 643 |
# File 'lib/stick/units/base.rb', line 641 def units @units end |
Instance Method Details
#*(m) ⇒ Object
649 650 651 |
# File 'lib/stick/units/base.rb', line 649 def *(m) Conversion.new(units * m.units, multiplier * m.multiplier) end |
#**(p) ⇒ Object
645 646 647 |
# File 'lib/stick/units/base.rb', line 645 def **(p) Conversion.new(units ** p, multiplier ** p) end |
#/(m) ⇒ Object
653 654 655 |
# File 'lib/stick/units/base.rb', line 653 def /(m) Conversion.new(units / m.units, multiplier / m.multiplier) end |