class ThinkingSphinx::RealTime::Attribute
Public Instance Methods
multi?()
click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 4 def multi? @options[:multi] end
translate(object)
click to toggle source
Calls superclass method
ThinkingSphinx::RealTime::Property#translate
# File lib/thinking_sphinx/real_time/attribute.rb, line 12 def translate(object) output = super || default_value json? ? output.to_json : output end
type()
click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 8 def type @options[:type] end
Private Instance Methods
default_value()
click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 20 def default_value type == :string ? '' : 0 end
json?()
click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 24 def json? type == :json end