Module: WeatherForecasts

Defined in:
lib/weather_forecasts.rb,
lib/weather_forecasts/client.rb,
lib/weather_forecasts/client/error.rb,
lib/weather_forecasts/client/query.rb,
lib/weather_forecasts/client/version.rb,
lib/weather_forecasts/client/help_console.rb,
lib/weather_forecasts/client/query/select_query.rb,
lib/weather_forecasts/client/query/query_property.rb,
lib/weather_forecasts/client/query/query_utilities.rb,
lib/weather_forecasts/client/query/select_hourly_query.rb,
lib/weather_forecasts/client/query/select_by_days_query.rb,
lib/weather_forecasts/client/query/selection_attributes.rb,
lib/weather_forecasts/client/query/select_coordinates_by_zip_query.rb,
lib/weather_forecasts/client/query/select_corner_coordinates_query.rb,
lib/weather_forecasts/client/query/select_square_coordinates_query.rb,
lib/weather_forecasts/client/query/select_coordinates_by_cities_query.rb,
lib/weather_forecasts/client/query/select_gridpoint_coordinates_query.rb,
lib/weather_forecasts/client/query/select_linepoint_coordinates_query.rb

Overview

Original web service description: graphical.weather.gov/xml/

Defined Under Namespace

Classes: Client

Class Method Summary collapse

Class Method Details

.client(options = {}) ⇒ Object

Returns a new instance of WeatherForecasts::Client



23
24
25
# File 'lib/weather_forecasts.rb', line 23

def client(options = {})
  Client.new(options)
end

.envObject

Returns the currently set environment (‘:test, :development or :production`)

This can be set from the shell environment using the ‘ENV` variable.



17
18
19
# File 'lib/weather_forecasts.rb', line 17

def env
  @@env ||= (ENV['ENV'].to_sym || :production)
end

.root_pathObject

Returns the root path from the install path of the project



29
30
31
# File 'lib/weather_forecasts.rb', line 29

def root_path
  File.expand_path(File.join(File.dirname(__FILE__), "../"))
end

.vendor_pathObject

Returns the vendor path from the install path of the project



35
36
37
# File 'lib/weather_forecasts.rb', line 35

def vendor_path
  File.join(root_path, "vendor")
end