Class: Bwrap::Config::Features::Base Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/bwrap/config/features/base.rb

Overview

This class is abstract.

Base of all features.

Direct Known Subclasses

Bash, Nscd, Ruby

Instance Method Summary collapse

Constructor Details

#initialize(features) ⇒ Base

Returns a new instance of Base.

Parameters:



8
9
10
# File 'lib/bwrap/config/features/base.rb', line 8

def initialize features
  @features = features
end

Instance Method Details

#disableObject

Disable the feature.



25
26
27
# File 'lib/bwrap/config/features/base.rb', line 25

def disable
  @enabled = false
end

#enableObject

Enable the feature.



20
21
22
# File 'lib/bwrap/config/features/base.rb', line 20

def enable
  @enabled = true
end

#enabled?Boolean

Checks if the feature has been enabled.

Returns:

  • (Boolean)

    whether feature is enabled



15
16
17
# File 'lib/bwrap/config/features/base.rb', line 15

def enabled?
  @enabled
end