Class: PassaporteWeb::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/passaporte_web/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.


5
6
7
8
# File 'lib/passaporte_web/configuration.rb', line 5

def initialize
  @url = 'https://v2.passaporteweb.com.br'
  @user_agent = "PassaporteWeb Ruby Client v#{PassaporteWeb::VERSION}"
end

Instance Attribute Details

#application_secretObject

Returns the value of attribute application_secret


3
4
5
# File 'lib/passaporte_web/configuration.rb', line 3

def application_secret
  @application_secret
end

#application_tokenObject

Returns the value of attribute application_token


3
4
5
# File 'lib/passaporte_web/configuration.rb', line 3

def application_token
  @application_token
end

#urlObject

Returns the value of attribute url


3
4
5
# File 'lib/passaporte_web/configuration.rb', line 3

def url
  @url
end

#user_agentObject

Returns the value of attribute user_agent


3
4
5
# File 'lib/passaporte_web/configuration.rb', line 3

def user_agent
  @user_agent
end

Instance Method Details

#url_for(path) ⇒ Object


10
11
12
# File 'lib/passaporte_web/configuration.rb', line 10

def url_for(path)
  %(#{url.chomp('/')}#{path})
end