Method: Azure::Directory::Config::Builder#scope

Defined in:
lib/azure/directory/config.rb

#scope(scope_name, &block) ⇒ Object

Set a new configuration for a specific scope, in order to support multiple connections to different applications. Provide a block with the configuration parameters.

Parameters:

  • scope_name (Symbol)

    Scope name



110
111
112
113
114
115
116
117
118
# File 'lib/azure/directory/config.rb', line 110

def scope( scope_name, &block )
	scopes = @config.instance_variable_get('@scopes')
	scopes[scope_name] = @current_config = Config.new(scope_name)

	@current_config.instance_variable_set('@token_store', @token_store)

	instance_eval(&block)
	@current_config = @config
end