Skip to content

Commit

Permalink
Merge pull request #156 from maxwell/master
Browse files Browse the repository at this point in the history
Add postal code knowledge
  • Loading branch information
hexorx committed Aug 16, 2014
2 parents 48df367 + 9019628 commit fc0ac93
Show file tree
Hide file tree
Showing 3 changed files with 301 additions and 37 deletions.
7 changes: 6 additions & 1 deletion lib/countries/country.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class ISO3166::Country
:un_locode,
:languages,
:nationality,
:eu_member
:eu_member,
:postal_code
]

AttrReaders.each do |meth|
Expand All @@ -46,6 +47,10 @@ def initialize(country_data)
def valid?
not (@data.nil? or @data.empty?)
end

alias_method :zip, :postal_code
alias_method :zip?, :postal_code
alias_method :postal_code?, :postal_code

def ==(other)
self.data == other.data
Expand Down
Loading

0 comments on commit fc0ac93

Please sign in to comment.