Method: Inspec::Resources::Group#initialize
- Defined in:
- lib/resources/group.rb
#initialize(groupname, domain = nil) ⇒ Group
Returns a new instance of Group.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/resources/group.rb', line 27 def initialize(groupname, domain = nil) @group = groupname.downcase @domain = domain @domain = @domain.downcase unless @domain.nil? @cache = nil # select group manager @group_provider = nil if inspec.os.unix? @group_provider = UnixGroup.new(inspec) elsif inspec.os.windows? @group_provider = WindowsGroup.new(inspec) else return skip_resource 'The `group` resource is not supported on your OS yet.' end end |