Class: ThinkingSphinx::ClassFacet

Inherits:
Facet
  • Object
show all
Defined in:
lib/thinking_sphinx/class_facet.rb

Instance Attribute Summary

Attributes inherited from Facet

#property

Instance Method Summary collapse

Methods inherited from Facet

attribute_name_for, attribute_name_from_value, #float?, #initialize, name_for, #to_s, translate?, #translate?, #type

Constructor Details

This class inherits a constructor from ThinkingSphinx::Facet

Instance Method Details

#attribute_nameObject



7
8
9
# File 'lib/thinking_sphinx/class_facet.rb', line 7

def attribute_name
  "class_crc"
end

#nameObject



3
4
5
# File 'lib/thinking_sphinx/class_facet.rb', line 3

def name
  :class
end

#value(object, attribute_hash) ⇒ Object



11
12
13
14
# File 'lib/thinking_sphinx/class_facet.rb', line 11

def value(object, attribute_hash)
  crc = attribute_hash['class_crc']
  ThinkingSphinx::Configuration.instance.models_by_crc[crc]
end