module NoaaWeatherClient::Responses::ReactiveXmlResponse

Public Instance Methods

method_missing(method_name, *arguments, &block) click to toggle source
Calls superclass method
# File lib/noaa_weather_client/responses/reactive_xml_response.rb, line 4
def method_missing(method_name, *arguments, &block)
  if tag = source.css(method_name.to_s)
    if block
      block.call tag.text
    else
      tag.text
    end
  else
    super
  end
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/noaa_weather_client/responses/reactive_xml_response.rb, line 16
def respond_to_missing?(method_name, include_private = false)
  source.css(method_name.to_s) || super
end
source() click to toggle source
# File lib/noaa_weather_client/responses/reactive_xml_response.rb, line 20
def source
  @source || NullResponse.new
end