Class: Riddle::Configuration::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/riddle/configuration/parser.rb

Defined Under Namespace

Classes: InnerParser

Constant Summary collapse

SOURCE_CLASSES =
{
  'mysql'    => Riddle::Configuration::SQLSource,
  'pgsql'    => Riddle::Configuration::SQLSource,
  'mssql'    => Riddle::Configuration::SQLSource,
  'xmlpipe'  => Riddle::Configuration::XMLSource,
  'xmlpipe2' => Riddle::Configuration::XMLSource,
  'odbc'     => Riddle::Configuration::SQLSource,
  'tsvpipe'  => Riddle::Configuration::TSVSource
}
INDEX_CLASSES =
{
  'plain'       => Riddle::Configuration::Index,
  'distributed' => Riddle::Configuration::DistributedIndex,
  'rt'          => Riddle::Configuration::RealtimeIndex,
  'template'    => Riddle::Configuration::TemplateIndex
}

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Parser

Returns a new instance of Parser.



24
25
26
# File 'lib/riddle/configuration/parser.rb', line 24

def initialize(input)
  @input   = input
end

Instance Method Details

#parse!Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/riddle/configuration/parser.rb', line 28

def parse!
  set_common
  set_indexer
  set_searchd
  set_sources
  set_indices

  add_orphan_sources

  configuration
end