Class: WeatherForecasts::Client::SelectHourlyQuery
- Includes:
- QueryUtilities
- Defined in:
- lib/weather_forecasts/client/query/select_hourly_query.rb
Constant Summary collapse
- ENDPOINT =
'http://forecast.weather.gov/MapClick.php'
Constants inherited from Query
Instance Attribute Summary
Attributes inherited from Query
#conditions, #select_attributes, #soap_client
Instance Method Summary collapse
Methods included from QueryUtilities
#build_coordinates, #transform_coordinate_list
Methods inherited from Query
#initialize, properties, property, selection_attributes, set_selection_attributes, #validate, #where
Constructor Details
This class inherits a constructor from WeatherForecasts::Client::Query
Instance Method Details
#build_message ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/weather_forecasts/client/query/select_hourly_query.rb', line 24 def { :lat => conditions[:latitude], :lon => conditions[:longitude], :FcstType => 'digitalDWML' } end |
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/weather_forecasts/client/query/select_hourly_query.rb', line 13 def execute validate request = HTTPI::Request.new request.url = ENDPOINT request.query = document = HTTPI.get(request) DWML.new( Nokogiri::XML(document.body) ).process end |