Class: Andy::Config
- Inherits:
-
Object
- Object
- Andy::Config
- Defined in:
- lib/andy/config.rb
Instance Method Summary collapse
- #get_pint(pint_name) ⇒ Object
- #home ⇒ Object
-
#initialize(andy_home = ENV['ANDY_HOME']) ⇒ Config
constructor
A new instance of Config.
- #pint_home ⇒ Object
- #pints ⇒ Object
Constructor Details
#initialize(andy_home = ENV['ANDY_HOME']) ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 |
# File 'lib/andy/config.rb', line 9 def initialize(andy_home = ENV['ANDY_HOME']) @home = andy_home @pint_home = "#{@home}/pints" @pints = load_pints end |
Instance Method Details
#get_pint(pint_name) ⇒ Object
27 28 29 |
# File 'lib/andy/config.rb', line 27 def get_pint(pint_name) @pints[pint_name] end |
#home ⇒ Object
15 16 17 |
# File 'lib/andy/config.rb', line 15 def home @home end |
#pint_home ⇒ Object
19 20 21 |
# File 'lib/andy/config.rb', line 19 def pint_home @pint_home end |
#pints ⇒ Object
23 24 25 |
# File 'lib/andy/config.rb', line 23 def pints @pints.values end |