Module: Sunspot::Type::FloatType
- Defined in:
- lib/sunspot/type.rb
Overview
The Float type represents floating-point numbers.
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:
94 95 96 |
# File 'lib/sunspot/type.rb', line 94 def cast(string) #:nodoc: string.to_f end |
.indexed_name(name) ⇒ Object
:nodoc:
86 87 88 |
# File 'lib/sunspot/type.rb', line 86 def indexed_name(name) #:nodoc: "#{name}_f" end |
.to_indexed(value) ⇒ Object
:nodoc:
90 91 92 |
# File 'lib/sunspot/type.rb', line 90 def to_indexed(value) #:nodoc: value.to_f.to_s if value end |