Module: Dynomite::Core

Included in:
Dynomite
Defined in:
lib/dynomite/core.rb

Constant Summary collapse

@@root =
nil
@@config =
nil

Instance Method Summary collapse

Instance Method Details

#configObject



12
13
14
# File 'lib/dynomite/core.rb', line 12

def config
  @@config ||= Config.new
end

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

Yields:



20
21
22
# File 'lib/dynomite/core.rb', line 20

def configure
  yield(config)
end

#loggerObject



16
17
18
# File 'lib/dynomite/core.rb', line 16

def logger
  config.logger
end

#rootObject



6
7
8
9
# File 'lib/dynomite/core.rb', line 6

def root
  return @@root if @@root
  @@root = ENV['DYNOMITE_ROOT'] || ENV['JETS_ROOT'] || ENV['RAILS_ROOT'] || '.'
end