Class: Sunspot::FacetData::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot/facet_data.rb

Direct Known Subclasses

FieldFacetData, QueryFacetData

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fieldObject (readonly)

:nodoc:



6
7
8
# File 'lib/sunspot/facet_data.rb', line 6

def field
  @field
end

Instance Method Details

#cast(value) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/sunspot/facet_data.rb', line 12

def cast(value)
  if @field
    @field.cast(value)
  else
    value
  end
end

#referenceObject



8
9
10
# File 'lib/sunspot/facet_data.rb', line 8

def reference
  @field.reference if @field
end

#row_value(value) ⇒ Object



20
21
22
# File 'lib/sunspot/facet_data.rb', line 20

def row_value(value)
  cast(value)
end