lib/address_extractor.rb
# Same as +replace_first_address+ but applies substition to all identified addresses.
Same as +replace_first_address+ but applies substition to all identified addresses.
Same as + replace_first_address + but applies substition to all identified addresses .
def replace_addresses(string)
      string.gsub(ADDRESS_PATTERN) do |match|
        hash = hashify_results match.scan(ADDRESS_PATTERN).first
        useful_address?(hash) ? yield(hash, $&) : match
      end
    end
def replace_addresses ( string ) string . gsub ( ADDRESS_PATTERN ) do | match | hash = hashify_results match . scan ( ADDRESS_PATTERN ) . first useful_address? ( hash ) ? yield ( hash , $& ) : match end end
Same as +replace_first_address+ but applies substition to all identified addresses.
Same as + replace_first_address + but applies substition to all identified addresses .
string
<not_specific>