Class: Ward
- Inherits:
-
Object
- Object
- Ward
- Includes:
- HTTParty
- Defined in:
- lib/ward.rb,
lib/ward/ward_data.rb
Defined Under Namespace
Classes: Data
Instance Method Summary (collapse)
-
- (Object) find(address)
Find the ward for a given address.
-
- (Ward) initialize(username = nil, api_key = nil)
constructor
A new instance of Ward.
Constructor Details
- (Ward) initialize(username = nil, api_key = nil)
A new instance of Ward
11 12 13 14 |
# File 'lib/ward.rb', line 11 def initialize(username = nil, api_key = nil) @username = username @api_key = api_key end |
Instance Method Details
- (Object) find(address)
Find the ward for a given address.
17 18 19 20 21 22 23 |
# File 'lib/ward.rb', line 17 def find(address) # Geocode the given address. geocode address ward = Data.new(data) ward.to_hash end |