Class: Druid::CircFilter

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) ⇒ CircFilter

Returns a new instance of CircFilter.



228
229
230
231
# File 'lib/druid/filter.rb', line 228

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

Instance Method Details

#to_hashObject



233
234
235
236
237
238
239
240
241
242
243
# File 'lib/druid/filter.rb', line 233

def to_hash
  {
  :type => "spatial",
  :dimension => @dimension,
  :bound =>{
    :type => "radius",
    :coords => @bounds.first,
    :radius => @bounds.last
    }
  }
end