Class: Longleaf::SystemConfigBuilder
- Inherits:
-
Object
- Object
- Longleaf::SystemConfigBuilder
- Defined in:
- lib/longleaf/specs/system_config_builder.rb
Overview
Test helper for constructing system configuration hashes
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#get ⇒ Object
The constructed configuration.
-
#initialize ⇒ SystemConfigBuilder
constructor
A new instance of SystemConfigBuilder.
- #with_index(adapter, connection) ⇒ Object
Constructor Details
#initialize ⇒ SystemConfigBuilder
Returns a new instance of SystemConfigBuilder
11 12 13 |
# File 'lib/longleaf/specs/system_config_builder.rb', line 11 def initialize @config = Hash.new end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
9 10 11 |
# File 'lib/longleaf/specs/system_config_builder.rb', line 9 def config @config end |
Instance Method Details
#get ⇒ Object
Returns the constructed configuration
23 24 25 |
# File 'lib/longleaf/specs/system_config_builder.rb', line 23 def get @config end |
#with_index(adapter, connection) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/longleaf/specs/system_config_builder.rb', line 15 def with_index(adapter, connection) @config[SCF::MD_INDEX] = Hash.new @config[SCF::MD_INDEX][SCF::MD_INDEX_ADAPTER] = adapter @config[SCF::MD_INDEX][SCF::MD_INDEX_CONNECTION] = connection self end |