Class: Druid::RecFilter

Inherits:
FilterDimension show all
Defined in:
lib/druid/filter.rb

Instance Method Summary collapse

Methods inherited from FilterDimension

#!, #&, #<, #<=, #>, #>=, #eq, #in, #in_circ, #in_rec, #javascript, #neq, #regexp, #|

Methods inherited from FilterParameter

#as_json, #to_json, #to_s

Constructor Details

#initialize(dimension, bounds) ⇒ RecFilter

Returns a new instance of RecFilter.



208
209
210
211
# File 'lib/druid/filter.rb', line 208

def initialize(dimension, bounds)
  @dimension = dimension
  @bounds = bounds
end

Instance Method Details

#to_hashObject



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/druid/filter.rb', line 213

def to_hash
  {
  :type => "spatial",
  :dimension => @dimension,
  :bound =>{
    :type => "rectangular",
    :minCoords => @bounds.first,
    :maxCoords => @bounds.last
    }
  }
end