Class: Sunspot::Type::IntegerType
- Inherits:
-
AbstractType
- Object
- AbstractType
- Sunspot::Type::IntegerType
- Defined in:
- sunspot/lib/sunspot/type.rb
Overview
The Integer type represents integers.
Direct Known Subclasses
Instance Method Summary (collapse)
-
- (Object) cast(string)
:nodoc:.
-
- (Object) indexed_name(name)
:nodoc:.
-
- (Object) to_indexed(value)
:nodoc:.
- - (Object) to_literal(value)
Methods inherited from AbstractType
#accepts_dynamic?, #accepts_more_like_this?
Instance Method Details
- (Object) cast(string)
:nodoc:
149 150 151 |
# File 'sunspot/lib/sunspot/type.rb', line 149 def cast(string) #:nodoc: string.to_i end |
- (Object) indexed_name(name)
:nodoc:
137 138 139 |
# File 'sunspot/lib/sunspot/type.rb', line 137 def indexed_name(name) #:nodoc: "#{name}_i" end |
- (Object) to_indexed(value)
:nodoc:
141 142 143 |
# File 'sunspot/lib/sunspot/type.rb', line 141 def to_indexed(value) #:nodoc: value.to_i.to_s if value end |
- (Object) to_literal(value)
145 146 147 |
# File 'sunspot/lib/sunspot/type.rb', line 145 def to_literal(value) to_indexed(value) end |