Class: Wright::Provider::Group

Inherits:
Wright::Provider show all
Defined in:
lib/wright/provider/group.rb,
lib/wright/provider/group/gnu_passwd.rb,
lib/wright/provider/group/darwin_directory_service.rb

Overview

Group provider. Used as a base class for Resource::Group providers.

Direct Known Subclasses

DarwinDirectoryService, GnuPasswd

Defined Under Namespace

Classes: DarwinDirectoryService, GnuPasswd

Constant Summary

Constants inherited from Wright::Provider

PROVIDER_DIR

Instance Method Summary collapse

Methods inherited from Wright::Provider

#initialize, #updated?

Constructor Details

This class inherits a constructor from Wright::Provider

Instance Method Details

#createvoid

This method returns an undefined value.

Adds the group.



12
13
14
15
16
17
# File 'lib/wright/provider/group.rb', line 12

def create
  group = @resource.name
  unless_uptodate(:create, "group already created: '#{group}'") do
    create_group
  end
end

#removevoid

This method returns an undefined value.

Removes the group.



22
23
24
25
26
27
# File 'lib/wright/provider/group.rb', line 22

def remove
  group = @resource.name
  unless_uptodate(:remove, "group already removed: '#{group}'") do
    remove_group
  end
end