Sha256: 2daf50f0e965a69fa412b22f4a36ab3ffc45367f93416aaad5193402abda838d

Contents?: true

Size: 373 Bytes

Versions: 38

Compression:

Stored size: 373 Bytes

Contents

Numeric.class_eval do
  def km
    self * Supernova::KM_TO_METER
  end
  
  def meter
    self.to_f
  end
  
  def mile
    self * Supernova::MILE_TO_METER
  end
  
  def to_radians
    self * Supernova::DEG_TO_RADIAN
  end
  
  def to_deg
    self * Supernova::RADIAN_TO_REG
  end
  
  alias_method :miles, :mile
  alias_method :kms, :km
  alias_method :meters, :meter
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
supernova-0.7.6 lib/supernova/numeric_extensions.rb
supernova-0.7.5 lib/supernova/numeric_extensions.rb
supernova-0.7.4 lib/supernova/numeric_extensions.rb
supernova-0.7.3 lib/supernova/numeric_extensions.rb
supernova-0.7.2 lib/supernova/numeric_extensions.rb
supernova-0.7.1 lib/supernova/numeric_extensions.rb
supernova-0.7.0 lib/supernova/numeric_extensions.rb
supernova-0.6.8 lib/supernova/numeric_extensions.rb
supernova-0.6.7 lib/supernova/numeric_extensions.rb
supernova-0.6.6 lib/supernova/numeric_extensions.rb
supernova-0.6.5 lib/supernova/numeric_extensions.rb
supernova-0.6.4 lib/supernova/numeric_extensions.rb
supernova-0.6.3 lib/supernova/numeric_extensions.rb
supernova-0.6.2 lib/supernova/numeric_extensions.rb
supernova-0.6.1 lib/supernova/numeric_extensions.rb
supernova-0.6.0 lib/supernova/numeric_extensions.rb
supernova-0.4.18 lib/supernova/numeric_extensions.rb
supernova-0.4.17 lib/supernova/numeric_extensions.rb
supernova-0.4.16 lib/supernova/numeric_extensions.rb
supernova-0.4.15 lib/supernova/numeric_extensions.rb