Module: Puppet::Util::Eselect

Extended by:
Eselect
Included in:
Eselect
Defined in:
lib/puppet/util/eselect.rb

Constant Summary collapse

COMMANDS =
{
  :eselect    => '/usr/bin/eselect',
  :gcc_config => '/usr/bin/gcc-config'
}

Instance Method Summary collapse

Instance Method Details

#module(name) ⇒ Hash

Builds a module combining the default and special modules

Parameters:

  • name (String)

    The name of the module

Returns:

  • (Hash)

    :

    • command [Symbol] The command used to manage this module

    • flags [Array<String>] The flags to pass to the command

    • param [String] The param to be passed after flags, or nil

    • get [Array] The flags to be passed to get the state of the module

    • set [Array] The flags to be passed to set the state of the module

    • parse [Proc] The function to parse the command output



23
24
25
# File 'lib/puppet/util/eselect.rb', line 23

def module(name)
  default_module(name).merge(CUSTOM_MODULES[name])
end