class Riddle::Configuration::Index
Attributes
Public Class Methods
Source
# File lib/riddle/configuration/index.rb, line 14 def initialize(name, *sources) @name = name @sources = sources initialize_settings end
Source
# File lib/riddle/configuration/index.rb, line 8 def self.settings Riddle::Configuration::IndexSettings.settings + [:source] end
Public Instance Methods
Source
# File lib/riddle/configuration/index.rb, line 25 def render raise ConfigurationError, "#{@name} #{@sources.inspect} #{@path} #{@parent}" unless valid? inherited_name = parent ? "#{name} : #{parent}" : "#{name}" ( @sources.collect { |s| s.render } + ["index #{inherited_name}", "{"] + settings_body + ["}", ""] ).join("\n") end
Source
# File lib/riddle/configuration/index.rb, line 21 def source @sources.collect { |s| s.name } end
Source
# File lib/riddle/configuration/index.rb, line 37 def valid? (!@name.nil?) && (!( @sources.length == 0 || @path.nil? ) || !@parent.nil?) end