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



99
100
101
# File 'lib/unitmanager/quantity.rb', line 99

def method_missing (method_name)
  QuantityInfo.new(self, method_name)
end

Instance Method Details

#to_quantity(calc) ⇒ Object



103
104
105
# File 'lib/unitmanager/quantity.rb', line 103

def to_quantity (calc)
  calc.quantity(self, nil)
end