Class: Chef::ChefFS::DataHandler::OrganizationMembersDataHandler

Inherits:
DataHandlerBase
  • Object
show all
Defined in:
lib/chef/chef_fs/data_handler/organization_members_data_handler.rb

Instance Method Summary collapse

Methods inherited from DataHandlerBase

#chef_class, #chef_object, #default, #from_ruby, #normalize_for_post, #normalize_for_put, #normalize_hash, #normalize_run_list, #preserve_key?, #remove_file_extension, #to_ruby, #to_ruby_keys, #verify_integrity

Instance Method Details

#minimize(members, entry) ⇒ Object



11
12
13
# File 'lib/chef/chef_fs/data_handler/organization_members_data_handler.rb', line 11

def minimize(members, entry)
  members
end

#normalize(members, entry) ⇒ Object



7
8
9
# File 'lib/chef/chef_fs/data_handler/organization_members_data_handler.rb', line 7

def normalize(members, entry)
  members.map { |member| member.is_a?(Hash) ? member["user"]["username"] : member }.sort.uniq
end