Class: SigepWeb::ApiResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/sigep_web/zip_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ApiResponse

Returns a new instance of ApiResponse.



31
32
33
34
35
36
37
38
39
40
# File 'lib/sigep_web/zip_query.rb', line 31

def initialize(options = {})
  @neighborhood     = options[:bairro]
  @zip              = options[:cep]
  @city             = options[:cidade]
  @complement       = options[:complemento]
  @other_complement = options[:complemento2]
  @address          = options[:end]
  @id               = options[:id]
  @uf               = options[:uf]
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def city
  @city
end

#complementObject (readonly)

Returns the value of attribute complement.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def complement
  @complement
end

#idObject (readonly)

Returns the value of attribute id.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def id
  @id
end

#neighborhoodObject (readonly)

Returns the value of attribute neighborhood.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def neighborhood
  @neighborhood
end

#other_complementObject (readonly)

Returns the value of attribute other_complement.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def other_complement
  @other_complement
end

#ufObject (readonly)

Returns the value of attribute uf.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def uf
  @uf
end

#zipObject (readonly)

Returns the value of attribute zip.



28
29
30
# File 'lib/sigep_web/zip_query.rb', line 28

def zip
  @zip
end