Class: Postal::Expand

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_postal/expand.rb

Class Method Summary collapse

Class Method Details

.expand_address(address, options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ruby_postal/expand.rb', line 5

def self.expand_address(address, options={})
    if not address
        return []
    end
    if address.respond_to?(:encode)
        address = address.encode("UTF-8")
    end
    expand_result = CExpand.expand_address address, options
    expand_result.map{|s| s.force_encoding("UTF-8")}

end