Class: Barometer::Noaa::CurrentApi
- Inherits:
-
Utils::Api
- Object
- Utils::Api
- Barometer::Noaa::CurrentApi
- Defined in:
- lib/barometer/noaa/current_api.rb
Instance Method Summary collapse
-
#initialize(query) ⇒ CurrentApi
constructor
A new instance of CurrentApi.
- #params ⇒ Object
- #unwrap_nodes ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(query) ⇒ CurrentApi
Returns a new instance of CurrentApi.
6 7 8 |
# File 'lib/barometer/noaa/current_api.rb', line 6 def initialize(query) @query = CurrentQuery.new(query) end |
Instance Method Details
#params ⇒ Object
14 15 16 |
# File 'lib/barometer/noaa/current_api.rb', line 14 def params nil end |
#unwrap_nodes ⇒ Object
18 19 20 |
# File 'lib/barometer/noaa/current_api.rb', line 18 def unwrap_nodes ['current_observation'] end |
#url ⇒ Object
10 11 12 |
# File 'lib/barometer/noaa/current_api.rb', line 10 def url "http://w1.weather.gov/xml/current_obs/#{@query.to_param}.xml" end |