Module: Ingress::PermissionsRepository::Hashes

Defined in:
lib/ingress/permissions_repository.rb

Overview

creates hashes with the default values required in PermissionsRepository’s constructor

Class Method Summary collapse

Class Method Details

.role_rulesObject

One level deep hash returning an array



92
93
94
# File 'lib/ingress/permissions_repository.rb', line 92

def role_rules
  Hash.new { |hash, key| hash[key] = [] }
end

.role_subject_action_ruleObject

Three level deep hash returning an array



81
82
83
84
85
86
87
88
89
# File 'lib/ingress/permissions_repository.rb', line 81

def role_subject_action_rule
  Hash.new do |hash1, key1|
    hash1[key1] = Hash.new do |hash2, key2|
      hash2[key2] = Hash.new do |hash3, key3|
        hash3[key3] = []
      end
    end
  end
end