Class: DWML::ParameterExtractor
- Inherits:
-
Object
- Object
- DWML::ParameterExtractor
- Defined in:
- lib/dwml/parameter_extractor.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#time_layouts ⇒ Object
readonly
Returns the value of attribute time_layouts.
Instance Method Summary collapse
-
#initialize(element, location, time_layouts) ⇒ ParameterExtractor
constructor
A new instance of ParameterExtractor.
- #process ⇒ Object
Constructor Details
#initialize(element, location, time_layouts) ⇒ ParameterExtractor
Returns a new instance of ParameterExtractor.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/dwml/parameter_extractor.rb', line 5 def initialize(element, location, time_layouts) @element = element @location = location @time_layouts = time_layouts @output = { :latitude => location.latitude, :longitude => location.longitude } end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
3 4 5 |
# File 'lib/dwml/parameter_extractor.rb', line 3 def element @element end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/dwml/parameter_extractor.rb', line 3 def location @location end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
3 4 5 |
# File 'lib/dwml/parameter_extractor.rb', line 3 def output @output end |
#time_layouts ⇒ Object (readonly)
Returns the value of attribute time_layouts.
3 4 5 |
# File 'lib/dwml/parameter_extractor.rb', line 3 def time_layouts @time_layouts end |
Instance Method Details
#process ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/dwml/parameter_extractor.rb', line 16 def process extract_temperatures extract_precipitation extract_wind_speed extract_wind_direction extract_cloud_cover extract_probability_of_precipitation extract_fire_weather extract_convective_hazard extract_climate_anomaly extract_humidity extract_weather extract_conditions_icons extract_hazards extract_water_state output end |