class ChefCLI::Policyfile::PolicyGroupRevIDMap
Attributes
policy_name[R]
revision_ids_by_group[R]
Public Class Methods
new(policy_name, revision_ids_by_group)
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 74 def initialize(policy_name, revision_ids_by_group) @policy_name = policy_name @revision_ids_by_group = revision_ids_by_group end
Public Instance Methods
each() { |group_name, rev_id| ... }
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 102 def each revision_ids_by_group.each do |group_name, rev_id| yield group_name, rev_id end end
empty?()
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 98 def empty? policy_group_names.empty? end
format_revision_ids() { |rev_id| ... }
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 91 def format_revision_ids revision_ids_by_group.inject({}) do |map, (group_name, rev_id)| map[group_name] = yield rev_id map end end
max_group_name_length()
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 87 def max_group_name_length policy_group_names.map(&:size).max end
policy_group_names()
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 83 def policy_group_names revision_ids_by_group.keys end
unique_revision_ids()
click to toggle source
# File lib/chef-cli/policyfile/lister.rb, line 79 def unique_revision_ids revision_ids_by_group.values.uniq end