Module: Postal

Defined in:
lib/postal_address.rb,
lib/postal_address/address.rb,
lib/postal_address/version.rb,
lib/postal_address/formatters/html.rb,
lib/postal_address/formatters/text.rb

Defined Under Namespace

Modules: AddressFormatter Classes: Address

Constant Summary collapse

VERSION =
"0.9.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.home_countryObject

Returns the value of attribute home_country.



10
11
12
# File 'lib/postal_address.rb', line 10

def home_country
  @home_country
end

Class Method Details

.address_formatsObject



20
21
22
# File 'lib/postal_address.rb', line 20

def address_formats
  @address_formats ||= YAML.load_file(path_for(:address_formats))
end

.country_namesObject



24
25
26
# File 'lib/postal_address.rb', line 24

def country_names
  @country_names ||= YAML.load_file(path_for(:country_names))
end

.sanitize(code) ⇒ Object



16
17
18
# File 'lib/postal_address.rb', line 16

def sanitize(code)
  code && code.to_s.downcase
end