Class: ThinkingSphinx::Middlewares::Geographer::Inner::GeolocationAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/middlewares/geographer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ GeolocationAttributes

Returns a new instance of GeolocationAttributes.



51
52
53
54
55
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 51

def initialize(context)
  self.context   = context
  self.latitude  = latitude_attr if latitude_attr
  self.longitude = longitude_attr if longitude_attr
end

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude.



49
50
51
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 49

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



49
50
51
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 49

def longitude
  @longitude
end

Instance Method Details

#geoObject



57
58
59
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 57

def geo
  search_context_options[:geo]
end