PolicyGroup.to_s()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
1
# frozen_string_literal: true
2
3
require_relative '../../mixin/entity'
4
require_relative '../policy'
5
6
module AMA
7
  module Chef
8
    module User
9
      module Model
10
        class Partition
11
          # Determines how user and group accounts will be treated
12
          class PolicyGroup
13
            include Mixin::Entity
14
15
            attribute :account, Policy, default: Policy::EDIT
16
            attribute :group, Policy, default: Policy::EDIT
17
18
            DEFAULT = new.tap do |instance|
19
              instance.account = Policy::EDIT
20
              instance.group = Policy::EDIT
21
            end
22
23
            def to_s
24
              "Partition.Policy {account: #{account}, group: #{group}}"
25
            end
26
          end
27
        end
28
      end
29
    end
30
  end
31
end
32