Class: Auger::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



11
12
13
14
# File 'lib/auger/config.rb', line 11

def initialize
  @projects = []
  self
end

Instance Attribute Details

#projectsObject

Returns the value of attribute projects.



4
5
6
# File 'lib/auger/config.rb', line 4

def projects
  @projects
end

Class Method Details

.load(filename) ⇒ Object



5
6
7
8
9
# File 'lib/auger/config.rb', line 5

def self.load(filename)
  config = new
  config.instance_eval(File.read(filename))
  config
end

Instance Method Details

#project(name, &block) ⇒ Object



16
17
18
# File 'lib/auger/config.rb', line 16

def project(name, &block)
  @projects << Project.load(name, &block)
end