Class: Riddle::Configuration
- Inherits:
-
Object
- Object
- Riddle::Configuration
- Defined in:
- lib/riddle/configuration.rb,
lib/riddle/configuration/index.rb,
lib/riddle/configuration/common.rb,
lib/riddle/configuration/source.rb,
lib/riddle/configuration/indexer.rb,
lib/riddle/configuration/searchd.rb,
lib/riddle/configuration/section.rb,
lib/riddle/configuration/sql_source.rb,
lib/riddle/configuration/tsv_source.rb,
lib/riddle/configuration/xml_source.rb,
lib/riddle/configuration/remote_index.rb,
lib/riddle/0.9.9/configuration/searchd.rb,
lib/riddle/configuration/index_settings.rb,
lib/riddle/configuration/realtime_index.rb,
lib/riddle/configuration/template_index.rb,
lib/riddle/configuration/distributed_index.rb
Defined Under Namespace
Modules: IndexSettings Classes: Common, ConfigurationError, DistributedIndex, Index, Indexer, Parser, RealtimeIndex, RemoteIndex, SQLSource, Searchd, Section, Source, TSVSource, TemplateIndex, XMLSource
Instance Attribute Summary collapse
-
#common ⇒ Object
readonly
Returns the value of attribute common.
-
#indexer ⇒ Object
Returns the value of attribute indexer.
-
#indices ⇒ Object
readonly
Returns the value of attribute indices.
-
#searchd ⇒ Object
readonly
Returns the value of attribute searchd.
-
#sources ⇒ Object
readonly
Returns the value of attribute sources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #render ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
33 34 35 36 37 38 39 |
# File 'lib/riddle/configuration.rb', line 33 def initialize @common = Riddle::Configuration::Common.new @indexer = Riddle::Configuration::Indexer.new @searchd = Riddle::Configuration::Searchd.new @indices = [] @sources = [] end |
Instance Attribute Details
#common ⇒ Object (readonly)
Returns the value of attribute common.
26 27 28 |
# File 'lib/riddle/configuration.rb', line 26 def common @common end |
#indexer ⇒ Object
Returns the value of attribute indexer.
27 28 29 |
# File 'lib/riddle/configuration.rb', line 27 def indexer @indexer end |
#indices ⇒ Object (readonly)
Returns the value of attribute indices.
26 27 28 |
# File 'lib/riddle/configuration.rb', line 26 def indices @indices end |
#searchd ⇒ Object (readonly)
Returns the value of attribute searchd.
26 27 28 |
# File 'lib/riddle/configuration.rb', line 26 def searchd @searchd end |
#sources ⇒ Object (readonly)
Returns the value of attribute sources.
26 27 28 |
# File 'lib/riddle/configuration.rb', line 26 def sources @sources end |
Class Method Details
.parse!(input) ⇒ Object
29 30 31 |
# File 'lib/riddle/configuration.rb', line 29 def self.parse!(input) Riddle::Configuration::Parser.new(input).parse! end |
Instance Method Details
#render ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/riddle/configuration.rb', line 41 def render ( [@common.render, @indexer.render, @searchd.render] + @sources.collect { |source| source.render } + @indices.collect { |index| index.render } ).join("\n") end |