Class: SpreeCmCommissioner::RolePermissionsLoader
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::RolePermissionsLoader
- Defined in:
- app/services/spree_cm_commissioner/role_permissions_loader.rb
Instance Attribute Summary collapse
-
#permissions_config ⇒ Object
readonly
Returns the value of attribute permissions_config.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#role_permissions ⇒ Object
readonly
Returns the value of attribute role_permissions.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(role, permissions_config) ⇒ RolePermissionsLoader
constructor
A new instance of RolePermissionsLoader.
Constructor Details
#initialize(role, permissions_config) ⇒ RolePermissionsLoader
Returns a new instance of RolePermissionsLoader.
5 6 7 8 9 |
# File 'app/services/spree_cm_commissioner/role_permissions_loader.rb', line 5 def initialize(role, ) @role = role @permissions_config = @role_permissions = [] end |
Instance Attribute Details
#permissions_config ⇒ Object (readonly)
Returns the value of attribute permissions_config.
3 4 5 |
# File 'app/services/spree_cm_commissioner/role_permissions_loader.rb', line 3 def @permissions_config end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
3 4 5 |
# File 'app/services/spree_cm_commissioner/role_permissions_loader.rb', line 3 def role @role end |
#role_permissions ⇒ Object (readonly)
Returns the value of attribute role_permissions.
3 4 5 |
# File 'app/services/spree_cm_commissioner/role_permissions_loader.rb', line 3 def @role_permissions end |
Instance Method Details
#call ⇒ Object
11 12 13 14 |
# File 'app/services/spree_cm_commissioner/role_permissions_loader.rb', line 11 def call .uniq(&:slug) end |