Class: ThinkingSphinx::Panes::DistancePane

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/panes/distance_pane.rb

Instance Method Summary collapse

Constructor Details

#initialize(context, object, raw) ⇒ DistancePane

Returns a new instance of DistancePane.



4
5
6
# File 'lib/thinking_sphinx/panes/distance_pane.rb', line 4

def initialize(context, object, raw)
  @raw = raw
end

Instance Method Details

#distanceObject



8
9
10
# File 'lib/thinking_sphinx/panes/distance_pane.rb', line 8

def distance
  @raw['geodist'].to_f
end

#geodistObject



12
13
14
# File 'lib/thinking_sphinx/panes/distance_pane.rb', line 12

def geodist
  @raw['geodist'].to_f
end