Class: Riddle::Configuration::RealtimeIndex
- Defined in:
- lib/riddle/configuration/realtime_index.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ RealtimeIndex
constructor
A new instance of RealtimeIndex.
- #render ⇒ Object
- #type ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(name) ⇒ RealtimeIndex
Returns a new instance of RealtimeIndex.
10 11 12 13 14 15 16 17 18 |
# File 'lib/riddle/configuration/realtime_index.rb', line 10 def initialize(name) @name = name @rt_field = [] @rt_attr_uint = [] @rt_attr_bigint = [] @rt_attr_float = [] = [] @rt_attr_string = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/riddle/configuration/realtime_index.rb', line 7 def name @name end |
Instance Method Details
#render ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/riddle/configuration/realtime_index.rb', line 28 def render raise ConfigurationError unless valid? ( ["index #{name}", "{"] + settings_body + ["}", ""] ).join("\n") end |
#type ⇒ Object
20 21 22 |
# File 'lib/riddle/configuration/realtime_index.rb', line 20 def type "rt" end |
#valid? ⇒ Boolean
24 25 26 |
# File 'lib/riddle/configuration/realtime_index.rb', line 24 def valid? !(@name.nil? || @path.nil?) end |