Class: Longleaf::SystemConfigBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/longleaf/specs/system_config_builder.rb

Overview

Test helper for constructing system configuration hashes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSystemConfigBuilder

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

#configObject

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

#getObject

Returns the constructed configuration

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