Class: Bracken::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/bracken/configuration.rb,
lib/bracken/configuration/builder.rb,
lib/bracken/configuration/options.rb

Defined Under Namespace

Classes: Builder, Options

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
# File 'lib/bracken/configuration.rb', line 10

def initialize
  @options = Options.new
  @builder = Builder.new(self)
  @files   = []
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



7
8
9
# File 'lib/bracken/configuration.rb', line 7

def builder
  @builder
end

#filesObject (readonly)

Returns the value of attribute files.



8
9
10
# File 'lib/bracken/configuration.rb', line 8

def files
  @files
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/bracken/configuration.rb', line 6

def options
  @options
end

Instance Method Details

#parse(arguments) ⇒ Object



16
17
18
19
20
# File 'lib/bracken/configuration.rb', line 16

def parse(arguments)
  options.parse(arguments)
  builder.parse(options.configuration_file)
  self
end

#streamsObject



22
23
24
# File 'lib/bracken/configuration.rb', line 22

def streams
  files.map { |file| file.stream }
end