Sha256: 63167aa3a5c4da014699da0596f3966bdfe54e1dedcd6f8008d1a91efa8abdc6

Contents?: true

Size: 359 Bytes

Versions: 2

Compression:

Stored size: 359 Bytes

Contents

class Stormglass::AlternateValues::Celsius

  def self.perform(subvalues)
    inject_fahrenheit(subvalues)
  end

  private

  def self.inject_fahrenheit(subvalues)
    subvalues << {unit_type: 'F', value: (subvalues.first[:value] * 1.8 + 32).round(2), unit: 'F', description: subvalues.first[:description], unit_description: 'degrees Fahrenheit'}
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stormglass-0.2.0 lib/stormglass/alternate_values/celsius.rb
stormglass-0.1.1 lib/stormglass/alternate_values/celsius.rb