Class: Datajud::Configuration
- Inherits:
-
Object
- Object
- Datajud::Configuration
- Defined in:
- lib/datajud/configuration.rb
Overview
Configurações da gem.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_endpoint ⇒ Object
Returns the value of attribute base_endpoint.
-
#fallback_all_on_miss ⇒ Object
Returns the value of attribute fallback_all_on_miss.
-
#ibge_base_url ⇒ Object
Returns the value of attribute ibge_base_url.
-
#lookup_ibge ⇒ Object
Returns the value of attribute lookup_ibge.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#retry_wait ⇒ Object
Returns the value of attribute retry_wait.
-
#tribunais ⇒ Object
Returns the value of attribute tribunais.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/datajud/configuration.rb', line 9 def initialize @base_endpoint = "https://api-publica.datajud.cnj.jus.br" @tribunais = [] @api_key = nil @open_timeout = 5 @read_timeout = 15 @retries = 1 @retry_wait = 0.3 @fallback_all_on_miss = true @lookup_ibge = true @ibge_base_url = "https://servicodados.ibge.gov.br/api/v1/localidades/municipios" end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def api_key @api_key end |
#base_endpoint ⇒ Object
Returns the value of attribute base_endpoint.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def base_endpoint @base_endpoint end |
#fallback_all_on_miss ⇒ Object
Returns the value of attribute fallback_all_on_miss.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def fallback_all_on_miss @fallback_all_on_miss end |
#ibge_base_url ⇒ Object
Returns the value of attribute ibge_base_url.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def ibge_base_url @ibge_base_url end |
#lookup_ibge ⇒ Object
Returns the value of attribute lookup_ibge.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def lookup_ibge @lookup_ibge end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def open_timeout @open_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def read_timeout @read_timeout end |
#retries ⇒ Object
Returns the value of attribute retries.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def retries @retries end |
#retry_wait ⇒ Object
Returns the value of attribute retry_wait.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def retry_wait @retry_wait end |
#tribunais ⇒ Object
Returns the value of attribute tribunais.
6 7 8 |
# File 'lib/datajud/configuration.rb', line 6 def tribunais @tribunais end |