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?, #to_literal

Instance Method Details

#cast(string) ⇒ Object

:nodoc:



127
128
129
# File 'lib/sunspot/type.rb', line 127

def cast(string) #:nodoc:
  string
end

#indexed_name(name) ⇒ Object

:nodoc:



119
120
121
# File 'lib/sunspot/type.rb', line 119

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

#to_indexed(value) ⇒ Object

:nodoc:



123
124
125
# File 'lib/sunspot/type.rb', line 123

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