Class: CoffeeOutside::Config
- Inherits:
-
Object
- Object
- CoffeeOutside::Config
- Defined in:
- lib/coffeeoutside.rb
Instance Attribute Summary collapse
-
#dispatchers ⇒ Object
readonly
Returns the value of attribute dispatchers.
-
#openweathermap ⇒ Object
readonly
Returns the value of attribute openweathermap.
Instance Method Summary collapse
-
#initialize(config_file = "config.yaml") ⇒ Config
constructor
A new instance of Config.
- #production? ⇒ Boolean
Constructor Details
#initialize(config_file = "config.yaml") ⇒ Config
Returns a new instance of Config.
21 22 23 24 25 26 |
# File 'lib/coffeeoutside.rb', line 21 def initialize(config_file = "config.yaml") config = YAML.load_file(config_file) @production = config["production"] @dispatchers = config["dispatchers"] @openweathermap = config["openweathermap"] end |
Instance Attribute Details
#dispatchers ⇒ Object (readonly)
Returns the value of attribute dispatchers.
19 20 21 |
# File 'lib/coffeeoutside.rb', line 19 def dispatchers @dispatchers end |
#openweathermap ⇒ Object (readonly)
Returns the value of attribute openweathermap.
19 20 21 |
# File 'lib/coffeeoutside.rb', line 19 def openweathermap @openweathermap end |
Instance Method Details
#production? ⇒ Boolean
28 29 30 |
# File 'lib/coffeeoutside.rb', line 28 def production? @production end |