Module: Reflex
- Defined in:
- lib/reflex/base.rb,
lib/reflex/system.rb,
lib/reflex/oauth_server.rb,
lib/reflex/configuration.rb,
lib/reflex/authlogic/account.rb,
lib/reflex/authlogic/session.rb,
lib/reflex/authlogic/connection.rb,
lib/reflex/authlogic/connectable.rb,
lib/reflex/authlogic/callback_filter.rb,
lib/reflex/authlogic/acts_as_authentic.rb,
lib/reflex/authlogic/authentication_process.rb
Defined Under Namespace
Modules: Authlogic
Classes: Base, Configuration, OAuthServer, System
Class Method Summary
collapse
Class Method Details
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/reflex/configuration.rb', line 28
def self.configure(options = {})
validate_valid_options!(options, :key, :secret, :endpoint)
authorization = Configuration.instance
options.each do |key, value|
authorization.send(:"#{key}=", value)
end
authorization
end
|
.validate_valid_options!(options, *keys) ⇒ Object
32
33
34
35
36
|
# File 'lib/reflex/base.rb', line 32
def self.validate_valid_options!(options, *keys)
unless options.keys.all? { |key| keys.include?(key) }
raise "Invalid options: #{(options.keys - keys).join(', ')}"
end
end
|