Module: Adhoq::GlobalVariable

Included in:
Adhoq
Defined in:
lib/adhoq/global_variable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



5
6
7
# File 'lib/adhoq/global_variable.rb', line 5

def self.extended(base)
  base.extend MonitorMixin
end

Instance Method Details

#configObject



19
20
21
# File 'lib/adhoq/global_variable.rb', line 19

def config
  @config ||= Adhoq::Configuration.new
end

#configure {|config| ... } ⇒ Object

Yields:



15
16
17
# File 'lib/adhoq/global_variable.rb', line 15

def configure(&block)
  yield config
end

#current_storageObject



9
10
11
12
13
# File 'lib/adhoq/global_variable.rb', line 9

def current_storage
  synchronize {
    @current_storage ||= setup_storage(*Adhoq.config.storage)
  }
end