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



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

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



47
48
49
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 47

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude



47
48
49
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 47

def longitude
  @longitude
end

Instance Method Details

#geoObject



55
56
57
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 55

def geo
  search_context_options[:geo]
end