Class: PostPolicy::Access

Inherits:
Object
  • Object
show all
Defined in:
lib/postpolicy/plugins/base/access.rb

Instance Method Summary collapse

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

#actionObject



14
15
16
# File 'lib/postpolicy/plugins/base/access.rb', line 14

def action
  @action
end

#match?(args) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/postpolicy/plugins/base/access.rb', line 10

def match?( args )
  @acls.all? { |acl| acl.match?( args ) }
end