Module: Inspec::Resources::GroupManagementSelector

Included in:
Group, Groups
Defined in:
lib/inspec/resources/groups.rb

Overview

This file contains two resources, the ‘group` and `groups` resource. The `group` resource is optimized for requests that verify specific groups that you know upfront for testing. If you need to query all groups or search specific groups with certain properties, use the `groups` resource.

Instance Method Summary collapse

Instance Method Details

#select_group_manager(os) ⇒ Object

select group provider based on the operating system returns nil, if no group manager was found for the operating system



14
15
16
17
18
19
20
21
22
# File 'lib/inspec/resources/groups.rb', line 14

def select_group_manager(os)
  @group_provider = if os.darwin?
                      DarwinGroup.new(inspec)
                    elsif os.unix?
                      UnixGroup.new(inspec)
                    elsif os.windows?
                      WindowsGroup.new(inspec)
                    end
end