Class: Esaj::UrlBuilder
- Inherits:
-
Object
- Object
- Esaj::UrlBuilder
- Defined in:
- lib/esaj/url_builder.rb
Instance Attribute Summary collapse
-
#forum ⇒ Object
readonly
Returns the value of attribute forum.
-
#oab_code ⇒ Object
readonly
Returns the value of attribute oab_code.
-
#page_number ⇒ Object
readonly
Returns the value of attribute page_number.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(oab_code, forum, page_number) ⇒ UrlBuilder
constructor
A new instance of UrlBuilder.
Constructor Details
#initialize(oab_code, forum, page_number) ⇒ UrlBuilder
Returns a new instance of UrlBuilder.
7 8 9 10 11 |
# File 'lib/esaj/url_builder.rb', line 7 def initialize(oab_code, forum, page_number) @oab_code = oab_code @forum = forum @page_number = page_number end |
Instance Attribute Details
#forum ⇒ Object (readonly)
Returns the value of attribute forum.
5 6 7 |
# File 'lib/esaj/url_builder.rb', line 5 def forum @forum end |
#oab_code ⇒ Object (readonly)
Returns the value of attribute oab_code.
5 6 7 |
# File 'lib/esaj/url_builder.rb', line 5 def oab_code @oab_code end |
#page_number ⇒ Object (readonly)
Returns the value of attribute page_number.
5 6 7 |
# File 'lib/esaj/url_builder.rb', line 5 def page_number @page_number end |
Instance Method Details
#build ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/esaj/url_builder.rb', line 13 def build "#{base_url}" + "?paginaConsulta=#{page_number}" + "?dadosConsulta.localPesquisa.cdLocal=#{forum_code}" + "&cbPesquisa=NUMOAB" + "&dadosConsulta.tipoNuProcesso=UNIFICADO" + "&dadosConsulta.valorConsulta=#{oab_code}" end |