Sha256: 42349cc471a7f9b918a53a24933531b5da978ec6e9c95cc5fd8c3c16cc1a2e7b

Contents?: true

Size: 429 Bytes

Versions: 7

Compression:

Stored size: 429 Bytes

Contents

module Correios
  module CEP
    class AddressFinder
      def get(zipcode)
        response = web_service.request! zipcode
        parser.address response
      end

      def self.get(zipcode)
        self.new.get zipcode
      end

      private

      def web_service
        @web_service ||= Correios::CEP::WebService.new
      end

      def parser
        @parser ||= Correios::CEP::Parser.new
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
correios-cep-0.3.1 lib/correios/cep/address_finder.rb
correios-cep-0.3.0 lib/correios/cep/address_finder.rb
correios-cep-0.2.0 lib/correios/cep/address_finder.rb
correios-cep-0.1.4 lib/correios/cep/address_finder.rb
correios-cep-0.1.3 lib/correios/cep/address_finder.rb
correios-cep-0.1.2 lib/correios/cep/address_finder.rb
correios-cep-0.1.1 lib/correios/cep/address_finder.rb