Class: NexaasID::Configuration

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.


11
12
13
14
# File 'lib/nexaas_id/configuration.rb', line 11

def initialize
  @url = 'https://id.nexaas.com'
  @user_agent = "Nexaas ID Ruby Client v#{NexaasID::VERSION}"
end

Instance Attribute Details

#application_secretObject

Returns the value of attribute application_secret


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

def application_secret
  @application_secret
end

#application_tokenObject

Returns the value of attribute application_token


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

def application_token
  @application_token
end

#urlObject

Returns the value of attribute url


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

def url
  @url
end

#user_agentObject

Returns the value of attribute user_agent


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

def user_agent
  @user_agent
end

Class Method Details

.build {|config| ... } ⇒ Object

Yields:

  • (config)

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

def self.build
  config = new
  yield(config) if block_given?
  config
end

Instance Method Details

#url_for(path) ⇒ Object


16
17
18
# File 'lib/nexaas_id/configuration.rb', line 16

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