Class: Puppet::Type::Acl::Rights

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/type/acl/rights.rb

Overview

Simple ACL Rights object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(permission) ⇒ Rights

Returns a new instance of Rights.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/puppet/type/acl/rights.rb', line 10

def initialize(permission)
  return if permission.nil? || permission.empty?
  @value = permission.downcase.to_sym unless @value.is_a?(Symbol)

  @order = case @value
           when :full
             0
           when :modify
             1
           when :write
             2
           when :read
             3
           when :execute
             4
           when :mask_specific
             5
           end
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order.



8
9
10
# File 'lib/puppet/type/acl/rights.rb', line 8

def order
  @order
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/puppet/type/acl/rights.rb', line 7

def value
  @value
end