Class: Radiosonde::Exporter
- Inherits:
-
Object
- Object
- Radiosonde::Exporter
- Includes:
- Utils
- Defined in:
- lib/radiosonde/exporter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(cloud_watch, options = {}) ⇒ Exporter
constructor
of class methods.
Methods included from Utils
collect_to_hash, diff, #matched?
Constructor Details
#initialize(cloud_watch, options = {}) ⇒ Exporter
of class methods
10 11 12 13 |
# File 'lib/radiosonde/exporter.rb', line 10 def initialize(cloud_watch, = {}) @cloud_watch = cloud_watch @options = end |
Class Method Details
.export(cloud_watch, opts = {}) ⇒ Object
5 6 7 |
# File 'lib/radiosonde/exporter.rb', line 5 def export(cloud_watch, opts = {}) self.new(cloud_watch, opts).export end |
Instance Method Details
#export ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/radiosonde/exporter.rb', line 15 def export result = {} @cloud_watch.alarms.each do |alarm| if matched?(alarm.alarm_name, @options[:include], @options[:exclude]) export_alarm(alarm, result) end end return result end |