Class: Sunspot::Type::StringType

Inherits:
AbstractType show all
Defined in:
lib/sunspot/type.rb

Overview

The String type represents string data.

Instance Method Summary collapse

Methods inherited from AbstractType

#accepts_dynamic?, #accepts_more_like_this?, instance, #to_literal

Instance Method Details

#cast(string) ⇒ Object

:nodoc:



125
126
127
# File 'lib/sunspot/type.rb', line 125

def cast(string) #:nodoc:
  string
end

#indexed_name(name) ⇒ Object

:nodoc:



117
118
119
# File 'lib/sunspot/type.rb', line 117

def indexed_name(name) #:nodoc:
  "#{name}_s"
end

#to_indexed(value) ⇒ Object

:nodoc:



121
122
123
# File 'lib/sunspot/type.rb', line 121

def to_indexed(value) #:nodoc:
  value.to_s if value
end