| Total Complexity | 2 | 
| Total Lines | 18 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | # frozen_string_literal: true | ||
| 12 | class Purge < Action | ||
| 13 | include Helper::SSHMethods | ||
| 14 | |||
| 15 | attr_accessor :account | ||
| 16 | |||
| 17 | # @param [AMA::Chef::User::Model::Account] account | ||
| 18 | def initialize(account) | ||
| 19 | @account = account | ||
| 20 | end | ||
| 21 | |||
| 22 | def apply(resource_factory) | ||
| 23 |                 resource_id = "#{ssh_directory(@account.id)}/authorized_keys" | ||
| 24 |                 ::Chef::Log.debug("Purging ssh keys for account #{@account.id}") | ||
| 25 | resource_factory.file resource_id do | ||
| 26 | action :delete | ||
| 27 | end | ||
| 28 | end | ||
| 29 | end | ||
| 30 | end | ||
| 36 |