Class: ThinkingSphinx::ActiveRecord::Field

Inherits:
Property
  • Object
show all
Includes:
Core::Field
Defined in:
lib/thinking_sphinx/active_record/field.rb

Instance Attribute Summary

Attributes inherited from Property

#columns, #options

Instance Method Summary collapse

Methods included from Core::Field

#infixing?, #prefixing?

Methods inherited from Property

#initialize, #name, #rebase, #source_type

Methods included from Core::Property

#facet?, #multi?, #type

Constructor Details

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

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/thinking_sphinx/active_record/field.rb', line 5

def file?
  options[:file]
end

#with_attribute?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/thinking_sphinx/active_record/field.rb', line 9

def with_attribute?
  options[:sortable] || options[:facet]
end

#wordcount?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/thinking_sphinx/active_record/field.rb', line 13

def wordcount?
  options[:wordcount]
end