Class: Newshound::Configuration
- Inherits:
-
Object
- Object
- Newshound::Configuration
- Defined in:
- lib/newshound/configuration.rb
Instance Attribute Summary collapse
-
#authorization_block ⇒ Object
Returns the value of attribute authorization_block.
-
#authorized_roles ⇒ Object
Returns the value of attribute authorized_roles.
-
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#exception_limit ⇒ Object
Returns the value of attribute exception_limit.
-
#exception_source ⇒ Object
Returns the value of attribute exception_source.
Instance Method Summary collapse
-
#authorize_with(&block) ⇒ Object
Allow custom authorization logic.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 |
# File 'lib/newshound/configuration.rb', line 8 def initialize @exception_limit = 10 @enabled = true = [:developer, :super_user] @current_user_method = :current_user = nil @exception_source = :exception_track end |
Instance Attribute Details
#authorization_block ⇒ Object
Returns the value of attribute authorization_block.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def end |
#authorized_roles ⇒ Object
Returns the value of attribute authorized_roles.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def end |
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def current_user_method @current_user_method end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def enabled @enabled end |
#exception_limit ⇒ Object
Returns the value of attribute exception_limit.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def exception_limit @exception_limit end |
#exception_source ⇒ Object
Returns the value of attribute exception_source.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def exception_source @exception_source end |
Instance Method Details
#authorize_with(&block) ⇒ Object
Allow custom authorization logic
18 19 20 |
# File 'lib/newshound/configuration.rb', line 18 def (&block) = block end |
#valid? ⇒ Boolean
22 23 24 |
# File 'lib/newshound/configuration.rb', line 22 def valid? enabled end |