Class: PetfinderV2::Serializers::Address
- Inherits:
-
Object
- Object
- PetfinderV2::Serializers::Address
- Defined in:
- lib/petfinder_V2/serializers/address.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
readonly
Returns the value of attribute address1.
-
#address2 ⇒ Object
readonly
Returns the value of attribute address2.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#postcode ⇒ Object
readonly
Returns the value of attribute postcode.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(data) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(data) ⇒ Address
6 7 8 9 10 11 12 13 14 |
# File 'lib/petfinder_V2/serializers/address.rb', line 6 def initialize(data) @data = data @address1 = data['address1'] @address2 = data['address2'] @city = data['city'] @state = data['state'] @postcode = data['postcode'] @country = data['country'] end |
Instance Attribute Details
#address1 ⇒ Object (readonly)
Returns the value of attribute address1.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def address1 @address1 end |
#address2 ⇒ Object (readonly)
Returns the value of attribute address2.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def address2 @address2 end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def country @country end |
#postcode ⇒ Object (readonly)
Returns the value of attribute postcode.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def postcode @postcode end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/petfinder_V2/serializers/address.rb', line 4 def state @state end |