Class Puppet::Network::Rights
In: lib/puppet/network/rights.rb
Parent: Hash

Define a set of rights and who has access to them.

Methods

[]   newright  

Classes and Modules

Class Puppet::Network::Rights::Right

Public Instance methods

[Source]

    # File lib/puppet/network/rights.rb, line 20
20:     def [](name)
21:         name = name.intern if name.is_a? String
22:         super(name)
23:     end

Define a new right to which access can be provided.

[Source]

    # File lib/puppet/network/rights.rb, line 26
26:     def newright(name)
27:         name = name.intern if name.is_a? String
28:         shortname = Right.shortname(name)
29:         if self.include? name
30:             raise ArgumentError, "Right '%s' is already defined" % name
31:         else
32:             self[name] = Right.new(name, shortname)
33:         end
34:     end

[Validate]