Class: GeocodeAddressJob
- Inherits:
-
Struct
- Object
- Struct
- GeocodeAddressJob
- Defined in:
- app/models/job/geocode_address_job.rb
Instance Attribute Summary collapse
-
#geocodeable ⇒ Object
Returns the value of attribute geocodeable.
Instance Method Summary collapse
-
#initialize(geocodeable) ⇒ GeocodeAddressJob
constructor
A new instance of GeocodeAddressJob.
- #perform ⇒ Object
Constructor Details
#initialize(geocodeable) ⇒ GeocodeAddressJob
Returns a new instance of GeocodeAddressJob.
2 3 4 |
# File 'app/models/job/geocode_address_job.rb', line 2 def initialize(geocodeable) @geocodeable = geocodeable end |
Instance Attribute Details
#geocodeable ⇒ Object
Returns the value of attribute geocodeable
1 2 3 |
# File 'app/models/job/geocode_address_job.rb', line 1 def geocodeable @geocodeable end |
Instance Method Details
#perform ⇒ Object
6 7 8 9 |
# File 'app/models/job/geocode_address_job.rb', line 6 def perform latlong_array = @geocodeable.geocode @geocodeable.update_attributes(lat: latlong_array.first, long: latlong_array.last) end |