Method: Wunderground::Location#initialize

Defined in:
lib/wunderground/location.rb

#initialize(options = {}) ⇒ Location

Returns a new instance of Location.

Raises:

  • (ArgumentError)


5
6
7
8
9
10
# File 'lib/wunderground/location.rb', line 5

def initialize(options = {})
  raise ArgumentError, "No Location Options Provided" if options.empty?
  options.each do |key, value|
    instance_variable_set("@#{key}".to_sym, value)
  end
end