Class: Fluent::Capability

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/capability.rb,
lib/fluent/capability.rb

Instance Method Summary collapse

Constructor Details

#initialize(target = nil, pid = nil) ⇒ Capability

Returns a new instance of Capability.



29
30
31
# File 'lib/fluent/capability.rb', line 29

def initialize(target = nil, pid = nil)
  @capng = CapNG.new(target, pid)
end

Instance Method Details

#apply(select_set) ⇒ Object



37
38
39
# File 'lib/fluent/capability.rb', line 37

def apply(select_set)
  @capng.apply(select_set)
end

#clear(select_set) ⇒ Object



41
42
43
# File 'lib/fluent/capability.rb', line 41

def clear(select_set)
  @capng.clear(select_set)
end

#have_capabilities?(select_set) ⇒ Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/fluent/capability.rb', line 53

def have_capabilities?(select_set)
  @capng.have_capabilities?(select_set)
end

#have_capability?(type, capability) ⇒ Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/fluent/capability.rb', line 45

def have_capability?(type, capability)
  @capng.have_capability?(type, capability)
end

#update(action, type, capability_or_capability_array) ⇒ Object



49
50
51
# File 'lib/fluent/capability.rb', line 49

def update(action, type, capability_or_capability_array)
  @capng.update(action, type, capability_or_capability_array)
end

#usable?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/fluent/capability.rb', line 33

def usable?
  true
end