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



43
44
45
46
47
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 43

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



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

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude



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

def longitude
  @longitude
end

Instance Method Details

#geoObject



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

def geo
  search_context_options[:geo]
end