Class: Flipflop::FeatureLoader
- Inherits:
-
Object
- Object
- Flipflop::FeatureLoader
- Extended by:
- Forwardable
- Defined in:
- lib/flipflop/feature_loader.rb
Constant Summary collapse
- @@lock =
Monitor.new
Class Method Summary collapse
Instance Method Summary collapse
- #append(engine) ⇒ Object
-
#initialize ⇒ FeatureLoader
constructor
A new instance of FeatureLoader.
Constructor Details
#initialize ⇒ FeatureLoader
Returns a new instance of FeatureLoader.
16 17 18 |
# File 'lib/flipflop/feature_loader.rb', line 16 def initialize @paths = [] end |
Class Method Details
.current ⇒ Object
6 7 8 |
# File 'lib/flipflop/feature_loader.rb', line 6 def current @current or @@lock.synchronize { @current ||= new } end |
Instance Method Details
#append(engine) ⇒ Object
20 21 22 |
# File 'lib/flipflop/feature_loader.rb', line 20 def append(engine) @paths.concat(engine.paths.add("config/features.rb".freeze).existent) end |