Module: ConectaAddressBr
- Defined in:
- lib/conecta_address_br.rb,
lib/conecta_address_br/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.8"
Instance Method Summary collapse
Instance Method Details
#fetch(keys) ⇒ Object
5659 5660 5661 5662 5663 5664 5665 5666 5667 |
# File 'lib/conecta_address_br.rb', line 5659 def fetch(keys) fetched = translate("addressList.#{key}") fetched = fetched.last if fetched.size <= 1 if !fetched.respond_to?(:sample) && fetched.match(%r{^\/}) && fetched.match(%r{\/$}) # A regex regexify(fetched) else fetched end end |