module UKPostcode
Constants
- COUNTRY_LOOKUP
- DEFAULT_PARSER_CHAIN
- VERSION
Public Class Methods
parse(str)
click to toggle source
Attempt to parse the string str as a postcode. Returns an object representing the postcode, or an InvalidPostcode
if the string cannot be parsed.
# File lib/uk_postcode.rb, line 16 def parse(str) DEFAULT_PARSER_CHAIN.parse(str) end
Private Instance Methods
parse(str)
click to toggle source
Attempt to parse the string str as a postcode. Returns an object representing the postcode, or an InvalidPostcode
if the string cannot be parsed.
# File lib/uk_postcode.rb, line 16 def parse(str) DEFAULT_PARSER_CHAIN.parse(str) end