Module: Units::System

Extended by:
Math
Defined in:
lib/units/system.rb

Overview

unit methods and constants are defined here to be injected in units blocks

Class Method Summary collapse

Methods included from Math

atan2, sqrt

Class Method Details

.define(unit) ⇒ Object



14
15
16
17
18
19
# File 'lib/units/system.rb', line 14

def self.define(unit)
  define_var unit
  PREFIXES.each do |prefix, (factor, name)|
    define_var "#{prefix}#{unit}".to_sym
  end
end