Class: Stormglass::AlternateValues

Inherits:
Object
  • Object
show all
Defined in:
lib/stormglass/alternate_values.rb

Defined Under Namespace

Classes: Celsius, Degrees, Kgm2, Kilometers, Meters, MetersSec

Class Method Summary collapse

Class Method Details

.c(subvalues) ⇒ Object



23
24
25
# File 'lib/stormglass/alternate_values.rb', line 23

def self.c(subvalues)

end

.km(subvalues) ⇒ Object



27
28
29
# File 'lib/stormglass/alternate_values.rb', line 27

def self.km(subvalues)

end

.meters(subvalues) ⇒ Object



19
20
21
# File 'lib/stormglass/alternate_values.rb', line 19

def self.meters(subvalues)

end

.meters_sec(subvalues) ⇒ Object



15
16
17
# File 'lib/stormglass/alternate_values.rb', line 15

def self.meters_sec(subvalues)

end

.perform(subvalues) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/stormglass/alternate_values.rb', line 3

def self.perform(subvalues)
  @original = subvalues.first
  case subvalues.first[:unit_type]
    when "Ms" then self::MetersSec.perform(subvalues)
    when "M"  then self::Meters.perform(subvalues)
    when "C" then self::Celsius.perform(subvalues)
    when "Km" then self::Kilometers.perform(subvalues)
    when 'Kgm2' then self::Kgm2.perform(subvalues)
    when 'Deg' then self::Degrees.perform(subvalues)
  end
end