Module: Quantity::Measurable
- Included in:
- Numeric
- Defined in:
- lib/unitmanager/quantity.rb
Overview
DSL (domain specific language) processing module. Mixin for Numeric class.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
66 67 68 |
# File 'lib/unitmanager/quantity.rb', line 66 def method_missing (method_name) QuantityInfo.new(self, method_name) end |
Instance Method Details
#to_quantity(calc) ⇒ Object
70 71 72 |
# File 'lib/unitmanager/quantity.rb', line 70 def to_quantity (calc) calc.quantity(self, nil) end |