Class: MapmyindiaRuby::GeoAddr
- Inherits:
-
Object
- Object
- MapmyindiaRuby::GeoAddr
- Defined in:
- lib/mapmyindia_ruby/geoaddr.rb
Instance Attribute Summary collapse
-
#area ⇒ Object
readonly
Returns the value of attribute area.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#formatted_address ⇒ Object
readonly
Returns the value of attribute formatted_address.
-
#house_no ⇒ Object
readonly
Returns the value of attribute house_no.
-
#lat ⇒ Object
readonly
Returns the value of attribute lat.
-
#lng ⇒ Object
readonly
Returns the value of attribute lng.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#PLZ ⇒ Object
readonly
Returns the value of attribute PLZ.
-
#POI ⇒ Object
readonly
Returns the value of attribute POI.
-
#street ⇒ Object
readonly
Returns the value of attribute street.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ GeoAddr
constructor
A new instance of GeoAddr.
Constructor Details
#initialize(attributes) ⇒ GeoAddr
Returns a new instance of GeoAddr.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 13 def initialize(attributes) @country = attributes["country"] @city = attributes["city"] @area = attributes["area"] @PLZ = attributes["PLZ"] @street = attributes["street"] @house_no = attributes["house_no"] @POI = attributes["POI"] @phone = attributes["phone"] @lng = attributes["lng"] @lat = attributes["lat"] @type = attributes["type"] @entries = attributes["entries"] @formatted_address = attributes["formatted_address"] end |
Instance Attribute Details
#area ⇒ Object (readonly)
Returns the value of attribute area.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def area @area end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def country @country end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def entries @entries end |
#formatted_address ⇒ Object (readonly)
Returns the value of attribute formatted_address.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def formatted_address @formatted_address end |
#house_no ⇒ Object (readonly)
Returns the value of attribute house_no.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def house_no @house_no end |
#lat ⇒ Object (readonly)
Returns the value of attribute lat.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def lat @lat end |
#lng ⇒ Object (readonly)
Returns the value of attribute lng.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def lng @lng end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def phone @phone end |
#PLZ ⇒ Object (readonly)
Returns the value of attribute PLZ.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def PLZ @PLZ end |
#POI ⇒ Object (readonly)
Returns the value of attribute POI.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def POI @POI end |
#street ⇒ Object (readonly)
Returns the value of attribute street.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def street @street end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 4 def type @type end |
Class Method Details
.build(addrs) ⇒ Object
7 8 9 10 11 |
# File 'lib/mapmyindia_ruby/geoaddr.rb', line 7 def self.build(addrs) addrs.collect do |addr| GeoAddr.new(addr) end end |