Class: Authority::Configuration
- Inherits:
-
Object
- Object
- Authority::Configuration
- Defined in:
- lib/authority/configuration.rb
Instance Attribute Summary collapse
-
#abilities ⇒ Object
Returns the value of attribute abilities.
-
#authority_actions ⇒ Object
Returns the value of attribute authority_actions.
-
#default_strategy ⇒ Object
Returns the value of attribute default_strategy.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#user_method ⇒ Object
Returns the value of attribute user_method.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/authority/configuration.rb', line 6 def initialize @default_strategy = Proc.new { |able, , user| false } @abilities = { :create => 'creatable', :read => 'readable', :update => 'updatable', :delete => 'deletable' } @authority_actions = { :index => 'read', :show => 'read', :new => 'create', :create => 'create', :edit => 'update', :update => 'update', :destroy => 'delete' } @user_method = :current_user @logger = Logger.new(STDERR) end |
Instance Attribute Details
#abilities ⇒ Object
Returns the value of attribute abilities.
4 5 6 |
# File 'lib/authority/configuration.rb', line 4 def abilities @abilities end |
#authority_actions ⇒ Object
Returns the value of attribute authority_actions.
4 5 6 |
# File 'lib/authority/configuration.rb', line 4 def @authority_actions end |
#default_strategy ⇒ Object
Returns the value of attribute default_strategy.
4 5 6 |
# File 'lib/authority/configuration.rb', line 4 def default_strategy @default_strategy end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/authority/configuration.rb', line 4 def logger @logger end |
#user_method ⇒ Object
Returns the value of attribute user_method.
4 5 6 |
# File 'lib/authority/configuration.rb', line 4 def user_method @user_method end |