Class: MiamiDadeGeo::Address
- Inherits:
-
Object
- Object
- MiamiDadeGeo::Address
- Defined in:
- lib/miami_dade_geo/address.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
-
#initialize(address) ⇒ Address
constructor
A new instance of Address.
- #lat ⇒ Object
- #long ⇒ Object
- #munic_code ⇒ Object
- #municipality ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
- #zip ⇒ Object
Constructor Details
#initialize(address) ⇒ Address
9 10 11 |
# File 'lib/miami_dade_geo/address.rb', line 9 def initialize(address) @address = address end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
7 8 9 |
# File 'lib/miami_dade_geo/address.rb', line 7 def address @address end |
Instance Method Details
#lat ⇒ Object
29 30 31 |
# File 'lib/miami_dade_geo/address.rb', line 29 def lat @lat ||= latlong[:lat] end |
#long ⇒ Object
33 34 35 |
# File 'lib/miami_dade_geo/address.rb', line 33 def long @long ||= latlong[:long] end |
#munic_code ⇒ Object
25 26 27 |
# File 'lib/miami_dade_geo/address.rb', line 25 def munic_code @munic_code ||= xy_addr[:munic_code].to_i end |
#municipality ⇒ Object
37 38 39 |
# File 'lib/miami_dade_geo/address.rb', line 37 def municipality @municipality ||= Municipality.new_with_code(munic_code) end |
#x ⇒ Object
13 14 15 |
# File 'lib/miami_dade_geo/address.rb', line 13 def x @x ||= xy_addr[:x].to_f end |
#y ⇒ Object
17 18 19 |
# File 'lib/miami_dade_geo/address.rb', line 17 def y @y ||= xy_addr[:y].to_f end |
#zip ⇒ Object
21 22 23 |
# File 'lib/miami_dade_geo/address.rb', line 21 def zip @zip ||= xy_addr[:zip_code].to_i end |