Class: Bwrap::Config::Features::Base Abstract
- Inherits:
-
Object
- Object
- Bwrap::Config::Features::Base
- Defined in:
- lib/bwrap/config/features/base.rb
Overview
This class is abstract.
Base of all features.
Instance Method Summary collapse
-
#disable ⇒ Object
Disable the feature.
-
#enable ⇒ Object
Enable the feature.
-
#enabled? ⇒ Boolean
Checks if the feature has been enabled.
-
#initialize(features) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(features) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/bwrap/config/features/base.rb', line 8 def initialize features @features = features end |
Instance Method Details
#disable ⇒ Object
Disable the feature.
25 26 27 |
# File 'lib/bwrap/config/features/base.rb', line 25 def disable @enabled = false end |
#enable ⇒ Object
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.
15 16 17 |
# File 'lib/bwrap/config/features/base.rb', line 15 def enabled? @enabled end |