mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
parent
90ed23f64d
commit
b6ecae6a35
41 changed files with 1239 additions and 61 deletions
25
app/models/contact/address.rb
Normal file
25
app/models/contact/address.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
class Contact
|
||||
class Address
|
||||
attr_reader :street
|
||||
attr_reader :zip
|
||||
attr_reader :city
|
||||
attr_reader :state
|
||||
attr_reader :country_code
|
||||
|
||||
def initialize(street, zip, city, state, country_code)
|
||||
@street = street
|
||||
@zip = zip
|
||||
@city = city
|
||||
@state = state
|
||||
@country_code = country_code
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
(street == other.street) &&
|
||||
(zip == other.zip) &&
|
||||
(city == other.city) &&
|
||||
(state == other.state) &&
|
||||
(country_code == other.country_code)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue