Class: Cep::ViaCep

Inherits:
CepService show all
Defined in:
lib/brval/cep/via_cep.rb

Constant Summary collapse

URL_HOME =
'https://viacep.com.br/ws/'.freeze

Instance Attribute Summary

Attributes inherited from CepService

#cep, #url

Instance Method Summary collapse

Methods inherited from CepService

#check, #info

Constructor Details

#initialize(cep) ⇒ ViaCep

Returns a new instance of ViaCep.



6
7
8
9
# File 'lib/brval/cep/via_cep.rb', line 6

def initialize cep
  super
  @url = URL_HOME + @cep + '/json'
end