Class: PrettyWeather::Configuration
- Inherits:
-
Object
- Object
- PrettyWeather::Configuration
- Defined in:
- lib/pretty_weather/configuration.rb
Instance Attribute Summary collapse
-
#city_name ⇒ Object
Returns the value of attribute city_name.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_options(&block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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_name ⇒ Object
Returns the value of attribute city_name.
3 4 5 |
# File 'lib/pretty_weather/configuration.rb', line 3 def city_name @city_name end |
#units ⇒ Object
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 (&block) block.yield(self) end |