Class: Cadooz::Immutable::Address
- Inherits:
-
Object
- Object
- Cadooz::Immutable::Address
- Includes:
- Mixins
- Defined in:
- lib/cadooz/models/immutable/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#department ⇒ Object
readonly
Returns the value of attribute department.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#firstname ⇒ Object
readonly
Returns the value of attribute firstname.
-
#lastname ⇒ Object
readonly
Returns the value of attribute lastname.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#salutation ⇒ Object
readonly
Returns the value of attribute salutation.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#street ⇒ Object
readonly
Returns the value of attribute street.
-
#street_addon ⇒ Object
readonly
Returns the value of attribute street_addon.
-
#zip_code ⇒ Object
readonly
Returns the value of attribute zip_code.
Instance Method Summary collapse
-
#initialize(open_struct) ⇒ Address
constructor
A new instance of Address.
Methods included from Mixins
#cadooz_class, #default_value_for_nil, #instance_variables_empty?, #serialize
Constructor Details
#initialize(open_struct) ⇒ Address
Returns a new instance of Address.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cadooz/models/immutable/address.rb', line 8 def initialize(open_struct) @city = open_struct&.city @company =open_struct&.company @country = open_struct&.country @department = open_struct&.department @email = open_struct&.email @firstname = open_struct&.firstname @lastname = open_struct&.lastname @phone = open_struct&.phone @salutation = open_struct&.salutation @state = open_struct&.state @street = open_struct&.street @street_addon = open_struct&.street_addon @zip_code = open_struct&.zipcode self.freeze end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def city @city end |
#company ⇒ Object (readonly)
Returns the value of attribute company.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def company @company end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def country @country end |
#department ⇒ Object (readonly)
Returns the value of attribute department.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def department @department end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def email @email end |
#firstname ⇒ Object (readonly)
Returns the value of attribute firstname.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def firstname @firstname end |
#lastname ⇒ Object (readonly)
Returns the value of attribute lastname.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def lastname @lastname end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def phone @phone end |
#salutation ⇒ Object (readonly)
Returns the value of attribute salutation.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def salutation @salutation end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def state @state end |
#street ⇒ Object (readonly)
Returns the value of attribute street.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def street @street end |
#street_addon ⇒ Object (readonly)
Returns the value of attribute street_addon.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def street_addon @street_addon end |
#zip_code ⇒ Object (readonly)
Returns the value of attribute zip_code.
4 5 6 |
# File 'lib/cadooz/models/immutable/address.rb', line 4 def zip_code @zip_code end |