Class: ResourcePolicy::Policy::MergePolicies
- Inherits:
-
Object
- Object
- ResourcePolicy::Policy::MergePolicies
- Defined in:
- lib/resource_policy/policy/merge_policies.rb
Overview
Service object using for merging two policy configurations
Defined Under Namespace
Classes: OverlappingActionError
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(policy, other_policy) ⇒ MergePolicies
constructor
A new instance of MergePolicies.
Constructor Details
#initialize(policy, other_policy) ⇒ MergePolicies
Returns a new instance of MergePolicies.
13 14 15 16 |
# File 'lib/resource_policy/policy/merge_policies.rb', line 13 def initialize(policy, other_policy) @policy = policy @other_policy = other_policy end |
Class Method Details
.call(*args) ⇒ Object
9 10 11 |
# File 'lib/resource_policy/policy/merge_policies.rb', line 9 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'lib/resource_policy/policy/merge_policies.rb', line 18 def call merge_actions merge_attributes policy end |