Class: ThinkingSphinx::Panes::DistancePane
- Inherits:
-
Object
- Object
- ThinkingSphinx::Panes::DistancePane
- Defined in:
- lib/thinking_sphinx/panes/distance_pane.rb
Instance Method Summary collapse
- #distance ⇒ Object
- #geodist ⇒ Object
-
#initialize(context, object, raw) ⇒ DistancePane
constructor
A new instance of DistancePane.
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
#distance ⇒ Object
8 9 10 |
# File 'lib/thinking_sphinx/panes/distance_pane.rb', line 8 def distance @raw['geodist'].to_f end |
#geodist ⇒ Object
12 13 14 |
# File 'lib/thinking_sphinx/panes/distance_pane.rb', line 12 def geodist @raw['geodist'].to_f end |