Class: PostPolicy::Access
- Inherits:
-
Object
- Object
- PostPolicy::Access
- Defined in:
- lib/postpolicy/plugins/base/access.rb
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(acls, action) ⇒ Access
constructor
A new instance of Access.
- #match?(args) ⇒ Boolean
Constructor Details
#initialize(acls, action) ⇒ Access
Returns a new instance of Access.
5 6 7 8 |
# File 'lib/postpolicy/plugins/base/access.rb', line 5 def initialize( acls, action ) @acls = acls @action = action end |
Instance Method Details
#action ⇒ Object
14 15 16 |
# File 'lib/postpolicy/plugins/base/access.rb', line 14 def action @action end |
#match?(args) ⇒ Boolean
10 11 12 |
# File 'lib/postpolicy/plugins/base/access.rb', line 10 def match?( args ) @acls.all? { |acl| acl.match?( args ) } end |