Class: ZiptasticApi::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/ziptastic_api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/ziptastic_api/response.rb', line 3

def city
  @city
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/ziptastic_api/response.rb', line 3

def country
  @country
end

#postal_codeObject

Returns the value of attribute postal_code.



3
4
5
# File 'lib/ziptastic_api/response.rb', line 3

def postal_code
  @postal_code
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/ziptastic_api/response.rb', line 3

def state
  @state
end

#state_shortObject

Returns the value of attribute state_short.



3
4
5
# File 'lib/ziptastic_api/response.rb', line 3

def state_short
  @state_short
end