class Riddle::Configuration

Attributes

indexer[RW]
indices[R]
searchd[R]
sources[R]

Public Class Methods

new() click to toggle source
# File lib/riddle/configuration.rb, line 28
def initialize
  @indexer = Riddle::Configuration::Indexer.new
  @searchd = Riddle::Configuration::Searchd.new
  @indices = []
  @sources = []
end
parse!(input) click to toggle source
# File lib/riddle/configuration.rb, line 24
def self.parse!(input)
  Riddle::Configuration::Parser.new(input).parse!
end

Public Instance Methods

render() click to toggle source
# File lib/riddle/configuration.rb, line 35
def render
  (
    [@indexer.render, @searchd.render] +
    @sources.collect { |source| source.render } +
    @indices.collect { |index| index.render }
  ).join("\n")
end