Class: Policy::Follower::FollowedPolicies Private
- Inherits:
-
Hash
- Object
- Hash
- Policy::Follower::FollowedPolicies
- Defined in:
- lib/policy/follower/followed_policies.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Describes the list of followed policies
Instance Method Summary collapse
-
#add(policy) ⇒ undefined
private
Registers followed policy with given unique key.
-
#apply_to(follower, *names) ⇒ undefined
private
Applies to follower the policies, selected by names.
Instance Method Details
#add(policy) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Registers followed policy with given unique key
17 18 19 |
# File 'lib/policy/follower/followed_policies.rb', line 17 def add(policy) self[policy.name] = policy end |
#apply_to(follower, *names) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Applies to follower the policies, selected by names
30 31 32 |
# File 'lib/policy/follower/followed_policies.rb', line 30 def apply_to(follower, *names) named_by(names).each { |policy| policy.apply_to(follower) } end |