Class: EVSS::PCIUAddress::InternationalAddress

Inherits:
Address
  • Object
show all
Defined in:
lib/evss/pciu_address/international_address.rb

Overview

Model for addresses outside the United States

Constant Summary

Constants inherited from Address

Address::ADDRESS_TYPES, Address::ZIP_CODE_REGEX, Address::ZIP_SUFFIX_REGEX

Instance Attribute Summary collapse

Attributes inherited from Address

#address_effective_date, #address_one, #address_three, #address_two, #type

Instance Attribute Details

#cityString

Returns City name, under 30 characters.

Returns:

  • (String)

    City name, under 30 characters



15
16
17
18
19
20
21
# File 'lib/evss/pciu_address/international_address.rb', line 15

class InternationalAddress < Address
  attribute :city, String
  attribute :country_name, String

  validates :city, pciu_address_line: true, presence: true, length: { maximum: 30 }
  validates :country_name, presence: true
end

#country_nameString

Returns Country name.

Returns:

  • (String)

    Country name



15
16
17
18
19
20
21
# File 'lib/evss/pciu_address/international_address.rb', line 15

class InternationalAddress < Address
  attribute :city, String
  attribute :country_name, String

  validates :city, pciu_address_line: true, presence: true, length: { maximum: 30 }
  validates :country_name, presence: true
end