summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
blob: c5a5f873c58c681e5f19ad3e6c3cd76b9b1777b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "chef/chef_fs/data_handler/data_handler_base"

class Chef
  module ChefFS
    module DataHandler
      class OrganizationInvitesDataHandler < DataHandlerBase
        def normalize(invites, entry)
          invites.map { |invite| invite.is_a?(Hash) ? invite["username"] : invite }.sort.uniq
        end

        def minimize(invites, entry)
          invites
        end
      end
    end
  end
end