Class: Moov::Models::Components::Address

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/address.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(address_line1:, city:, state_or_province:, postal_code:, country:, address_line2: nil) ⇒ Address

Returns a new instance of Address.



30
31
32
33
34
35
36
37
# File 'lib/moov/models/components/address.rb', line 30

def initialize(address_line1:, city:, state_or_province:, postal_code:, country:, address_line2: nil)
  @address_line1 = address_line1
  @city = city
  @state_or_province = state_or_province
  @postal_code = postal_code
  @country = country
  @address_line2 = address_line2
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/moov/models/components/address.rb', line 40

def ==(other)
  return false unless other.is_a? self.class
  return false unless @address_line1 == other.address_line1
  return false unless @city == other.city
  return false unless @state_or_province == other.state_or_province
  return false unless @postal_code == other.postal_code
  return false unless @country == other.country
  return false unless @address_line2 == other.address_line2
  true
end