class Riddle::Configuration::Index
Attributes
parent[RW]
sources[RW]
Public Class Methods
new(name, *sources)
click to toggle source
# File lib/riddle/configuration/index.rb, line 14 def initialize(name, *sources) @name = name @sources = sources initialize_settings end
settings()
click to toggle source
# File lib/riddle/configuration/index.rb, line 8 def self.settings Riddle::Configuration::IndexSettings.settings + [:source] end
Public Instance Methods
render()
click to toggle 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()
click to toggle source
# File lib/riddle/configuration/index.rb, line 21 def source @sources.collect { |s| s.name } end
valid?()
click to toggle source
# File lib/riddle/configuration/index.rb, line 37 def valid? (!@name.nil?) && (!( @sources.length == 0 || @path.nil? ) || !@parent.nil?) end