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
18
19
20
# File 'lib/wright/provider/group.rb', line 12

def create
  if uptodate?(:create)
    Wright.log.debug "group already created: '#{@resource.name}'"
    return
  end

  create_group
  @updated = true
end

#removevoid

This method returns an undefined value.

Removes the group.



25
26
27
28
29
30
31
32
33
# File 'lib/wright/provider/group.rb', line 25

def remove
  if uptodate?(:remove)
    Wright.log.debug "group already removed: '#{@resource.name}'"
    return
  end

  remove_group
  @updated = true
end