Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/dsl.rb

Direct Known Subclasses

Unit

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(name, system = nil)



6
7
8
# File 'lib/unit/dsl.rb', line 6

def method_missing(name, system = nil)
  Unit.to_unit(Unit.method_name_to_unit(name), system) * self
end

Instance Method Details

- (Object) unit(unit, system = nil)



2
3
4
# File 'lib/unit/dsl.rb', line 2

def unit(unit, system = nil)
  Unit.to_unit(unit, system) * self
end