class ThinkingSphinx::RealTime::Attribute

Public Instance Methods

multi?() click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 2
def multi?
  @options[:multi]
end
translate(object) click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 10
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 6
def type
  @options[:type]
end

Private Instance Methods

default_value() click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 18
def default_value
  type == :string ? '' : 0
end
json?() click to toggle source
# File lib/thinking_sphinx/real_time/attribute.rb, line 22
def json?
  type == :json
end