Module: Sunspot::Type::IntegerType
- Defined in:
- lib/sunspot/type.rb
Overview
The Integer type represents integers.
Class Method Summary collapse
-
.cast(string) ⇒ Object
:nodoc:.
-
.indexed_name(name) ⇒ Object
:nodoc:.
-
.to_indexed(value) ⇒ Object
:nodoc:.
Class Method Details
.cast(string) ⇒ Object
:nodoc:
75 76 77 |
# File 'lib/sunspot/type.rb', line 75 def cast(string) #:nodoc: string.to_i end |
.indexed_name(name) ⇒ Object
:nodoc:
67 68 69 |
# File 'lib/sunspot/type.rb', line 67 def indexed_name(name) #:nodoc: "#{name}_i" end |
.to_indexed(value) ⇒ Object
:nodoc:
71 72 73 |
# File 'lib/sunspot/type.rb', line 71 def to_indexed(value) #:nodoc: value.to_i.to_s if value end |