Class: RediSearch::Schema::GeoField
- Defined in:
- lib/redi_search/schema/geo_field.rb
Instance Method Summary collapse
-
#initialize(name, sortable: false, no_index: false, &block) ⇒ GeoField
constructor
A new instance of GeoField.
- #to_a ⇒ Object
Methods inherited from Field
#cast, #coerce, #name, #serialize
Constructor Details
#initialize(name, sortable: false, no_index: false, &block) ⇒ GeoField
Returns a new instance of GeoField.
6 7 8 9 10 11 |
# File 'lib/redi_search/schema/geo_field.rb', line 6 def initialize(name, sortable: false, no_index: false, &block) @name = name @sortable = sortable @no_index = no_index @value_block = block end |
Instance Method Details
#to_a ⇒ Object
13 14 15 16 17 18 |
# File 'lib/redi_search/schema/geo_field.rb', line 13 def to_a query = [name.to_s, "GEO"] query += query end |