PolicyGroup   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A to_s() 0 3 1
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