Module: DynaMo::Environment
- Defined in:
- lib/dyna_mo/environment.rb
Constant Summary collapse
- @@contexts_store =
{}
- @@contexts_mutex =
Mutex.new
Class Method Summary collapse
Class Method Details
.apply_environment ⇒ Object
20 21 22 23 24 25 |
# File 'lib/dyna_mo/environment.rb', line 20 def self.apply_environment @@contexts_store.each do |name, contexts| contexts.__apply__ end true end |
.contexts(name, default_context_name) ⇒ Object
14 15 16 17 18 |
# File 'lib/dyna_mo/environment.rb', line 14 def self.contexts(name, default_context_name) context = ( @@contexts_store[name] ||= DynaMo::Contexts.new(name, default_context_name) ) context.default_context_name = default_context_name context end |
.synchronize ⇒ Object
8 9 10 11 12 |
# File 'lib/dyna_mo/environment.rb', line 8 def self.synchronize @@contexts_mutex.synchronize do yield end end |