Class: Flipflop::FeatureLoader

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/flipflop/feature_loader.rb

Constant Summary collapse

@@lock =
Monitor.new

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFeatureLoader

Returns a new instance of FeatureLoader.


16
17
18
# File 'lib/flipflop/feature_loader.rb', line 16

def initialize
  @paths = []
end

Class Method Details

.currentObject


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