Class: PrettyWeather::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pretty_weather/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
# File 'lib/pretty_weather/configuration.rb', line 5

def initialize
  @city_name = 'london'
  @units = 'metric'
end

Instance Attribute Details

#city_nameObject

Returns the value of attribute city_name.



3
4
5
# File 'lib/pretty_weather/configuration.rb', line 3

def city_name
  @city_name
end

#unitsObject

Returns the value of attribute units.



3
4
5
# File 'lib/pretty_weather/configuration.rb', line 3

def units
  @units
end

Instance Method Details

#set_options(&block) ⇒ Object



10
11
12
# File 'lib/pretty_weather/configuration.rb', line 10

def set_options(&block)
  block.yield(self)
end