Class: ZiptasticApi::Response
- Inherits:
-
Object
- Object
- ZiptasticApi::Response
- Defined in:
- lib/ziptastic_api/response.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
-
#state_short ⇒ Object
Returns the value of attribute state_short.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(attrs) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/ziptastic_api/response.rb', line 5 def initialize(attrs) attrs.each do |name, value| instance_variable_set "@#{name}", value end end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/ziptastic_api/response.rb', line 3 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/ziptastic_api/response.rb', line 3 def country @country end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
3 4 5 |
# File 'lib/ziptastic_api/response.rb', line 3 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/ziptastic_api/response.rb', line 3 def state @state end |
#state_short ⇒ Object
Returns the value of attribute state_short.
3 4 5 |
# File 'lib/ziptastic_api/response.rb', line 3 def state_short @state_short end |