Module: Scales

Defined in:
lib/scales-core.rb,
lib/scales-core/base.rb,
lib/scales-core/config.rb,
lib/scales-core/helper.rb,
lib/scales-core/scalify.rb,
lib/scales-core/storage.rb,
lib/scales-core/version.rb,
lib/scales-core/storage/sync.rb,
lib/scales-core/storage/async.rb,
lib/scales-core/helper/content_types.rb,
lib/scales-core/helper/partial_resolver.rb

Defined Under Namespace

Modules: Config, Core, Helper, Storage Classes: Scalify

Class Method Summary collapse

Class Method Details

.configObject



4
5
6
# File 'lib/scales-core/base.rb', line 4

def config
  Config.config
end

.envObject



8
9
10
# File 'lib/scales-core/base.rb', line 8

def env
  ENV['SCALES_ENV'] ||= "development"
end

.env=(env) ⇒ Object



12
13
14
# File 'lib/scales-core/base.rb', line 12

def env=(env)
  ENV['SCALES_ENV'] = env
end

.pwdObject



16
17
18
# File 'lib/scales-core/base.rb', line 16

def pwd
  Config.pwd
end

.pwd=(pwd) ⇒ Object



20
21
22
# File 'lib/scales-core/base.rb', line 20

def pwd=(pwd)
  Config.pwd = pwd
end

.try_to_setup_env!Object



24
25
26
27
28
# File 'lib/scales-core/base.rb', line 24

def try_to_setup_env!
  return if ARGV.empty?
  return if ARGV.first =~ /^\-/
  Scales.env = ARGV.pop
end