Module: Barometer

Defined in:
lib/barometer.rb,
lib/barometer/base.rb,
lib/barometer/utils.rb,
lib/barometer/query.rb,
lib/barometer/weather.rb,
lib/barometer/version.rb,
lib/barometer/data/geo.rb,
lib/barometer/response.rb,
lib/barometer/data/sun.rb,
lib/barometer/utils/get.rb,
lib/barometer/data/zone.rb,
lib/barometer/utils/time.rb,
lib/barometer/utils/post.rb,
lib/barometer/query/base.rb,
lib/barometer/data/vector.rb,
lib/barometer/query/format.rb,
lib/barometer/utils/payload.rb,
lib/barometer/query/service.rb,
lib/barometer/data/distance.rb,
lib/barometer/response/base.rb,
lib/barometer/data/pressure.rb,
lib/barometer/data/location.rb,
lib/barometer/utils/address.rb,
lib/barometer/query/converter.rb,
lib/barometer/weather_service.rb,
lib/barometer/response/current.rb,
lib/barometer/data/temperature.rb,
lib/barometer/utils/xml_reader.rb,
lib/barometer/utils/data_types.rb,
lib/barometer/utils/json_reader.rb,
lib/barometer/query/formats/icao.rb,
lib/barometer/query/formats/base.rb,
lib/barometer/response/prediction.rb,
lib/barometer/utils/config_reader.rb,
lib/barometer/query/formats/woe_id.rb,
lib/barometer/query/formats/zipcode.rb,
lib/barometer/query/formats/unknown.rb,
lib/barometer/utils/key_file_parser.rb,
lib/barometer/weather_services/noaa.rb,
lib/barometer/query/formats/geocode.rb,
lib/barometer/data/convertable_units.rb,
lib/barometer/weather_services/yahoo.rb,
lib/barometer/query/services/timezone.rb,
lib/barometer/query/formats/weather_id.rb,
lib/barometer/query/formats/postalcode.rb,
lib/barometer/query/services/to_woe_id.rb,
lib/barometer/query/formats/coordinates.rb,
lib/barometer/query/converters/to_woe_id.rb,
lib/barometer/query/formats/short_zipcode.rb,
lib/barometer/query/converters/to_geocode.rb,
lib/barometer/query/services/yahoo_geocode.rb,
lib/barometer/query/services/to_weather_id.rb,
lib/barometer/utils/versioned_registration.rb,
lib/barometer/weather_services/weather_bug.rb,
lib/barometer/query/services/google_geocode.rb,
lib/barometer/query/formats/noaa_station_id.rb,
lib/barometer/weather_services/wunderground.rb,
lib/barometer/weather_services/parsers/yahoo.rb,
lib/barometer/query/converters/to_weather_id.rb,
lib/barometer/response/prediction_collection.rb,
lib/barometer/query/services/noaa_station_id.rb,
lib/barometer/weather_services/requesters/noaa.rb,
lib/barometer/weather_services/requesters/yahoo.rb,
lib/barometer/weather_services/parsers/noaa_current.rb,
lib/barometer/weather_services/parsers/noaa_forecast.rb,
lib/barometer/weather_services/requesters/weather_bug.rb,
lib/barometer/weather_services/requesters/wunderground.rb,
lib/barometer/query/converters/from_geocode_to_coordinates.rb,
lib/barometer/weather_services/parsers/weather_bug_current.rb,
lib/barometer/weather_services/parsers/wunderground_current.rb,
lib/barometer/weather_services/parsers/weather_bug_forecast.rb,
lib/barometer/query/converters/from_short_zipcode_to_zipcode.rb,
lib/barometer/weather_services/parsers/wunderground_forecast.rb,
lib/barometer/query/converters/from_woe_or_weather_id_to_geocode.rb,
lib/barometer/query/converters/from_coordinates_to_noaa_station_id.rb

Defined Under Namespace

Modules: Data, Parser, Query, Requester, Response, Utils, WeatherService Classes: Base, ConvertedQuery, OutOfSources, TimeoutError, Weather

Constant Summary

VERSION =
'0.8.0'
KEY_FILE =
File.expand_path(File.join('~', '.barometer'))
@@config =
{ 1 => {:wunderground => {:version => :v1}} }
@@debug_mode =
false
@@yahoo_placemaker_app_id =
nil
@@timeout =
15

Class Method Summary (collapse)

Class Method Details

+ (Object) config



14
# File 'lib/barometer.rb', line 14

def self.config; @@config; end

+ (Object) config=(hash)



15
# File 'lib/barometer.rb', line 15

def self.config=(hash); @@config = hash; end

+ (Object) debug



18
# File 'lib/barometer.rb', line 18

def self.debug; @@debug_mode; end

+ (Object) debug!



20
# File 'lib/barometer.rb', line 20

def self.debug!; @@debug_mode = true; end

+ (Object) debug=(value)



19
# File 'lib/barometer.rb', line 19

def self.debug=(value); @@debug_mode = value; end

+ (Boolean) debug?

Returns:

  • (Boolean)


21
# File 'lib/barometer.rb', line 21

def self.debug?; @@debug_mode; end

+ (Object) new(query)



31
32
33
# File 'lib/barometer.rb', line 31

def self.new(query)
  Barometer::Base.new(query)
end

+ (Object) timeout



28
# File 'lib/barometer.rb', line 28

def self.timeout; @@timeout; end

+ (Object) timeout=(value)



29
# File 'lib/barometer.rb', line 29

def self.timeout=(value); @@timeout = value; end

+ (Object) yahoo_placemaker_app_id



24
# File 'lib/barometer.rb', line 24

def self.yahoo_placemaker_app_id; @@yahoo_placemaker_app_id; end

+ (Object) yahoo_placemaker_app_id=(yahoo_key)



25
# File 'lib/barometer.rb', line 25

def self.yahoo_placemaker_app_id=(yahoo_key); @@yahoo_placemaker_app_id = yahoo_key; end