geomap 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/geomap.rb +5 -3
  2. metadata +1 -1
data/lib/geomap.rb CHANGED
@@ -4,14 +4,16 @@ require 'net/http'
4
4
 
5
5
  class Place < ActiveRecord::Base
6
6
 
7
- def latlng=(lat, lng)
7
+ attr_accessor :latitude, :longitude, :address
8
+
9
+ def reverse_geocode lat, lng
8
10
  @latitude, @longitude = lat, lng
9
11
  @address = get_results [lat, lng], true
10
12
  end
11
13
 
12
- def address=(address)
14
+ def geocode address
13
15
  @address = address
14
- address = address.gsub!(/\s/, '+')
16
+ address = address.gsub(/\s/, '+')
15
17
  @latitude, @longitude = get_results [address], false
16
18
  end
17
19
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: geomap
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - choodur