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