Remove   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 3 1
A apply() 0 5 1
A to_s() 0 3 1
1
# frozen_string_literal: true
2
3
require_relative '../../action'
4
5
module AMA
6
  module Chef
7
    module User
8
      class Action
9
        module Account
10
          class Remove < Action
11
            attr_accessor :account
12
13
            # @param [AMA::Chef::User::Model::Account] account
14
            def initialize(account)
15
              @account = account
16
            end
17
18
            def apply(resource_factory)
19
              resource_factory.user @account.id.to_s do
20
                action :remove
21
              end
22
            end
23
24
            def to_s
25
              "account[#{account.id}]:remove"
26
            end
27
          end
28
        end
29
      end
30
    end
31
  end
32
end
33