Sha256: 47ed7ff4206e8bfddf98263bb45f7af2f4acba0c2b9b1cb88230ef02ddaddf3b

Contents?: true

Size: 341 Bytes

Versions: 2

Compression:

Stored size: 341 Bytes

Contents

class Stormglass::AlternateValues::Kgm2

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

  private

  def self.inject_inches(subvalues)
    subvalues << {unit_type: 'inches', unit: 'in', value: (subvalues.first[:value] * 0.039370).round(2), description: subvalues.first[:description], unit_description: 'inches'}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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