Class: CoffeeOutside::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dispatchersObject (readonly)

Returns the value of attribute dispatchers.



19
20
21
# File 'lib/coffeeoutside.rb', line 19

def dispatchers
  @dispatchers
end

#openweathermapObject (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

Returns:

  • (Boolean)


28
29
30
# File 'lib/coffeeoutside.rb', line 28

def production?
  @production
end