class Stormglass::AlternateValues::Kgm2
Public Class Methods
perform(subvalues)
click to toggle source
# File lib/stormglass/alternate_values/kgm2.rb, line 3 def self.perform(subvalues) inject_inches(subvalues) end
Private Class Methods
inject_inches(subvalues)
click to toggle source
# File lib/stormglass/alternate_values/kgm2.rb, line 9 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