Class: Aven::Configuration
- Inherits:
-
Object
- Object
- Aven::Configuration
- Defined in:
- lib/aven/configuration.rb
Instance Attribute Summary collapse
-
#authenticated_root_path ⇒ Object
Returns the value of attribute authenticated_root_path.
-
#oauth_providers ⇒ Object
Returns the value of attribute oauth_providers.
Instance Method Summary collapse
-
#configure_oauth(provider, credentials = {}) ⇒ Object
Configure OAuth providers.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#resolve_authenticated_root_path ⇒ String
Resolves authenticated_root_path, calling it if it’s a lambda/proc.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 |
# File 'lib/aven/configuration.rb', line 6 def initialize @authenticated_root_path = nil @oauth_providers = {} end |
Instance Attribute Details
#authenticated_root_path ⇒ Object
Returns the value of attribute authenticated_root_path.
3 4 5 |
# File 'lib/aven/configuration.rb', line 3 def authenticated_root_path @authenticated_root_path end |
#oauth_providers ⇒ Object
Returns the value of attribute oauth_providers.
4 5 6 |
# File 'lib/aven/configuration.rb', line 4 def oauth_providers @oauth_providers end |
Instance Method Details
#configure_oauth(provider, credentials = {}) ⇒ Object
Configure OAuth providers
26 27 28 |
# File 'lib/aven/configuration.rb', line 26 def configure_oauth(provider, credentials = {}) @oauth_providers[provider.to_sym] = credentials end |
#resolve_authenticated_root_path ⇒ String
Resolves authenticated_root_path, calling it if it’s a lambda/proc
33 34 35 36 37 |
# File 'lib/aven/configuration.rb', line 33 def resolve_authenticated_root_path return nil if @authenticated_root_path.nil? @authenticated_root_path.respond_to?(:call) ? @authenticated_root_path.call : @authenticated_root_path end |