Sha256: 6e4412f97903ff43c7a0064ce06e74319e301538d9001a5e1fc07d005b36dfaf

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

module Scales
  class << self

    def config
      Config.config
    end
    
    def env
      ENV['SCALES_ENV'] ||= "development"
    end
    
    def env=(env)
      ENV['SCALES_ENV'] = env
    end
    
    def pwd
      Config.pwd
    end
    
    def pwd=(pwd)
      Config.pwd = pwd
    end
    
    def try_to_setup_env!
      return if ARGV.empty?
      return if ARGV.first =~ /^\-/
      Scales.env = ARGV.pop
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scales-core-0.0.4 lib/scales-core/base.rb
scales-core-0.0.1.beta.2 lib/scales-core/base.rb
scales-core-0.0.1.beta.1 lib/scales-core/base.rb