Class: Sunspot::Type::StringType

Inherits:
AbstractType show all
Defined in:
sunspot/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

- (Object) cast(string)

:nodoc:



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

def cast(string) #:nodoc:
  string
end

- (Object) indexed_name(name)

:nodoc:



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

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

- (Object) to_indexed(value)

:nodoc:



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

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