1 | # frozen_string_literal: true |
||
2 | |||
3 | require_relative '../../action' |
||
4 | |||
5 | module AMA |
||
6 | module Chef |
||
7 | module User |
||
8 | View Code Duplication | class Action |
|
0 ignored issues
–
show
Duplication
introduced
by
Loading history...
|
|||
9 | module Group |
||
10 | class AppendMembers < Action |
||
11 | attr_accessor :group |
||
12 | |||
13 | # @param [AMA::Chef::User::Model::Group] group |
||
14 | def initialize(group) |
||
15 | @group = group |
||
16 | end |
||
17 | |||
18 | def apply(resource_factory) |
||
19 | group = @group |
||
20 | resource_factory.group "#{group.id}:members:append" do |
||
21 | group_name group.id.to_s |
||
22 | members group.members.to_a |
||
23 | append true |
||
24 | end |
||
25 | end |
||
26 | end |
||
27 | end |
||
28 | end |
||
29 | end |
||
30 | end |
||
31 | end |
||
32 |