Class: ThinkingSphinx::RealTime::Attribute

Inherits:
Property
  • Object
show all
Defined in:
lib/thinking_sphinx/real_time/attribute.rb

Instance Attribute Summary

Attributes inherited from Property

#column, #options

Instance Method Summary collapse

Methods inherited from Property

#initialize, #name

Methods included from Core::Property

#facet?

Constructor Details

This class inherits a constructor from ThinkingSphinx::RealTime::Property

Instance Method Details

#multi?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/thinking_sphinx/real_time/attribute.rb', line 4

def multi?
  @options[:multi]
end

#translate(object) ⇒ Object



12
13
14
15
16
# File 'lib/thinking_sphinx/real_time/attribute.rb', line 12

def translate(object)
  output = super || default_value

  json? ? output.to_json : output
end

#typeObject



8
9
10
# File 'lib/thinking_sphinx/real_time/attribute.rb', line 8

def type
  @options[:type]
end