Sha256: 8cdb82a384cb5961a65b8a348a2054052059b6f71154a54de069167c02d9484e

Contents?: true

Size: 608 Bytes

Versions: 4

Compression:

Stored size: 608 Bytes

Contents

require 'longleaf/models/system_config_fields'
require 'yaml'

module Longleaf
  # Test helper for constructing system configuration hashes
  class SystemConfigBuilder
    SCF ||= Longleaf::SystemConfigFields

    attr_accessor :config

    def initialize
      @config = Hash.new
    end

    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

    # @return the constructed configuration
    def get
      @config
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
longleaf-1.1.1 lib/longleaf/specs/system_config_builder.rb
longleaf-1.1.0 lib/longleaf/specs/system_config_builder.rb
longleaf-1.0.0 lib/longleaf/specs/system_config_builder.rb
longleaf-0.3.0 lib/longleaf/specs/system_config_builder.rb