Total Complexity | 2 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # frozen_string_literal: true |
||
12 | class Revoke < Action |
||
13 | attr_accessor :group |
||
14 | attr_accessor :privilege |
||
15 | |||
16 | # @param [AMA::Chef::User::Model::Group] group |
||
17 | # @param [AMA::Chef::User::Model::Privilege] privilege |
||
18 | def initialize(group, privilege) |
||
19 | @group = group |
||
20 | @privilege = privilege |
||
21 | end |
||
22 | |||
23 | def apply(resource_factory) |
||
24 | registry = ::AMA::Chef::User::Handler::Privilege |
||
25 | handler = registry.retrieve!(:group, @privilege.type) |
||
26 | handler.revoke(resource_factory, @group, @privilege) |
||
27 | end |
||
28 | end |
||
29 | end |
||
35 |