Class: GeoMagic::Location::City
- Inherits:
-
Object
- Object
- GeoMagic::Location::City
- Defined in:
- lib/geo_magic/location.rb
Instance Attribute Summary collapse
-
#metrocode ⇒ Object
Returns the value of attribute metrocode.
-
#name ⇒ Object
Returns the value of attribute name.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#initialize(name, zipcode, metrocode) ⇒ City
constructor
A new instance of City.
- #to_s ⇒ Object
Constructor Details
#initialize(name, zipcode, metrocode) ⇒ City
Returns a new instance of City.
27 28 29 30 31 |
# File 'lib/geo_magic/location.rb', line 27 def initialize name, zipcode, metrocode @name = name @zipcode = zipcode @metrocode = metrocode end |
Instance Attribute Details
#metrocode ⇒ Object
Returns the value of attribute metrocode.
25 26 27 |
# File 'lib/geo_magic/location.rb', line 25 def metrocode @metrocode end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/geo_magic/location.rb', line 25 def name @name end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
25 26 27 |
# File 'lib/geo_magic/location.rb', line 25 def zipcode @zipcode end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/geo_magic/location.rb', line 33 def to_s "city: #{name}#{zip_str}#{metro_str}" end |