Class: Bracken::Configuration
- Inherits:
-
Object
- Object
- Bracken::Configuration
- Defined in:
- lib/bracken/configuration.rb,
lib/bracken/configuration/builder.rb,
lib/bracken/configuration/options.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #parse(arguments) ⇒ Object
- #streams ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
7 8 9 |
# File 'lib/bracken/configuration.rb', line 7 def builder @builder end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
8 9 10 |
# File 'lib/bracken/configuration.rb', line 8 def files @files end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/bracken/configuration.rb', line 6 def @options end |
Instance Method Details
#parse(arguments) ⇒ Object
16 17 18 19 20 |
# File 'lib/bracken/configuration.rb', line 16 def parse(arguments) .parse(arguments) builder.parse(.configuration_file) self end |
#streams ⇒ Object
22 23 24 |
# File 'lib/bracken/configuration.rb', line 22 def streams files.map { |file| file.stream } end |