Class: SnowWeather::Conditions
- Inherits:
-
Object
- Object
- SnowWeather::Conditions
- Includes:
- SnowWeather
- Defined in:
- lib/SnowWeather/conditions.rb
Constant Summary
Constants included from SnowWeather
Instance Attribute Summary
Attributes included from SnowWeather
Class Method Summary collapse
Methods included from SnowWeather
Class Method Details
.getConditions(state, city) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/SnowWeather/conditions.rb', line 5 def self.getConditions(state, city) @slash = '/' @base_url = 'http://api.wunderground.com/api/' + @@api_key.to_s + '/conditions/q/' + state.to_s + @slash.to_s + city.to_s + '.json' @data = open(@base_url.to_s).read @parse_data = JSON.parse(@data) return @parse_data end |