Class: Ziptedu::Zipcode
- Inherits:
-
Object
- Object
- Ziptedu::Zipcode
- Defined in:
- lib/ziptedu/zipcode.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#state ⇒ Object
Returns the value of attribute state.
-
#type ⇒ Object
Returns the value of attribute type.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Zipcode
constructor
A new instance of Zipcode.
- #to_s ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Zipcode
Returns a new instance of Zipcode.
8 9 10 |
# File 'lib/ziptedu/zipcode.rb', line 8 def initialize yield self if block_given? end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
5 6 7 |
# File 'lib/ziptedu/zipcode.rb', line 5 def city @city end |
#latitude ⇒ Object
Returns the value of attribute latitude.
5 6 7 |
# File 'lib/ziptedu/zipcode.rb', line 5 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
5 6 7 |
# File 'lib/ziptedu/zipcode.rb', line 5 def longitude @longitude end |
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/ziptedu/zipcode.rb', line 5 def state @state end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/ziptedu/zipcode.rb', line 6 def type @type end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
5 6 7 |
# File 'lib/ziptedu/zipcode.rb', line 5 def zipcode @zipcode end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/ziptedu/zipcode.rb', line 16 def to_s JSON.pretty_generate({ zipcode: zipcode, type: type, city: city, state: state, latitude: latitude, longitude: longitude }) end |