Class: Andy::Config

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

Instance Method Summary collapse

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

#homeObject



15
16
17
# File 'lib/andy/config.rb', line 15

def home
	@home
end

#pint_homeObject



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

def pint_home
	@pint_home
end

#pintsObject



23
24
25
# File 'lib/andy/config.rb', line 23

def pints 
  @pints.values
end