Class: Radiosonde::DSL::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/radiosonde/dsl/converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exported, options = {}) ⇒ Converter

of class methods



10
11
12
13
# File 'lib/radiosonde/dsl/converter.rb', line 10

def initialize(exported, options = {})
  @exported = exported
  @options = options
end

Class Method Details

.convert(exported, opts = {}) ⇒ Object



5
6
7
# File 'lib/radiosonde/dsl/converter.rb', line 5

def convert(exported, opts = {})
  self.new(exported, opts).convert
end

Instance Method Details

#convertObject



15
16
17
18
19
# File 'lib/radiosonde/dsl/converter.rb', line 15

def convert
  @exported.each.map {|alarm_name, alarm_attrs|
    output_alarm(alarm_name, alarm_attrs)
  }.join("\n")
end