class Address

Attributes

city[R]
country[R]
street[R]

Public Class Methods

new(street, city, country) click to toggle source
# File activerecord/test/models/customer.rb, line 18
def initialize(street, city, country)
  @street, @city, @country = street, city, country
end

Public Instance Methods

==(other) click to toggle source
# File activerecord/test/models/customer.rb, line 26
def ==(other)
  other.is_a?(self.class) && other.street == street && other.city == city && other.country == country
end
close_to?(other_address) click to toggle source
# File activerecord/test/models/customer.rb, line 22
def close_to?(other_address)
  city == other_address.city && country == other_address.country
end