Class: Argus::Trail::Configuration
- Inherits:
-
Object
- Object
- Argus::Trail::Configuration
- Defined in:
- lib/argus/trail/configuration.rb
Defined Under Namespace
Classes: MissingAuthorization
Instance Attribute Summary collapse
-
#actor_class_name ⇒ Object
Returns the value of attribute actor_class_name.
-
#authorize_with ⇒ Object
Returns the value of attribute authorize_with.
-
#changed_by_resolver ⇒ Object
Returns the value of attribute changed_by_resolver.
-
#current_actor_method ⇒ Object
Returns the value of attribute current_actor_method.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#permission_class_name ⇒ Object
Returns the value of attribute permission_class_name.
-
#role_class_name ⇒ Object
Returns the value of attribute role_class_name.
-
#role_permission_class_name ⇒ Object
Returns the value of attribute role_permission_class_name.
Instance Method Summary collapse
- #actor_class ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #permission_class ⇒ Object
- #role_class ⇒ Object
- #role_permission_class ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/argus/trail/configuration.rb', line 17 def initialize @actor_class_name = "User" @role_class_name = "Argus::Trail::Role" @permission_class_name = "Argus::Trail::Permission" @role_permission_class_name = "Argus::Trail::RolePermission" @changed_by_resolver = -> { Argus::Trail::Current.actor } @authorize_with = nil @current_actor_method = :current_user @per_page = 30 @layout = nil end |
Instance Attribute Details
#actor_class_name ⇒ Object
Returns the value of attribute actor_class_name.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def actor_class_name @actor_class_name end |
#authorize_with ⇒ Object
Returns the value of attribute authorize_with.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def @authorize_with end |
#changed_by_resolver ⇒ Object
Returns the value of attribute changed_by_resolver.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def changed_by_resolver @changed_by_resolver end |
#current_actor_method ⇒ Object
Returns the value of attribute current_actor_method.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def current_actor_method @current_actor_method end |
#layout ⇒ Object
Returns the value of attribute layout.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def layout @layout end |
#per_page ⇒ Object
Returns the value of attribute per_page.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def per_page @per_page end |
#permission_class_name ⇒ Object
Returns the value of attribute permission_class_name.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def @permission_class_name end |
#role_class_name ⇒ Object
Returns the value of attribute role_class_name.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def role_class_name @role_class_name end |
#role_permission_class_name ⇒ Object
Returns the value of attribute role_permission_class_name.
13 14 15 |
# File 'lib/argus/trail/configuration.rb', line 13 def @role_permission_class_name end |
Instance Method Details
#actor_class ⇒ Object
29 30 31 |
# File 'lib/argus/trail/configuration.rb', line 29 def actor_class actor_class_name.to_s.constantize end |
#permission_class ⇒ Object
37 38 39 |
# File 'lib/argus/trail/configuration.rb', line 37 def .to_s.constantize end |
#role_class ⇒ Object
33 34 35 |
# File 'lib/argus/trail/configuration.rb', line 33 def role_class role_class_name.to_s.constantize end |
#role_permission_class ⇒ Object
41 42 43 |
# File 'lib/argus/trail/configuration.rb', line 41 def .to_s.constantize end |