Sha256: b810258ea5536b31dc3712653cb637aa8acde07bc6b9e1e41790293b8da31b36

Contents?: true

Size: 443 Bytes

Versions: 24

Compression:

Stored size: 443 Bytes

Contents

require 'yaml'

class JavascriptTestAutotest::Config
  def self.get var, default = nil
    value = configs[var.to_s]
    value ||= default
    value ||= yield if block_given?
    value
  end

  private
    def self.configs
      unless defined? @@configs
        file = File.expand_path("#{APP_ROOT}/config/javascript_test_autotest.yml")
        @@configs = File.exist?(file) ? YAML.load_file(file) : {}
      end
      @@configs
    end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
newjs-1.7.4 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.0.1 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.0.2 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.0.3 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.0.0 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.1.0 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.2.0 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.2.1 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.0 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.0.4 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.2 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.3 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.4 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.5 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.6 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.1 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.3.7 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.4.1 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.5.0 lib/newjs/autotest/javascript_test_autotest/config.rb
newjs-1.5.1 lib/newjs/autotest/javascript_test_autotest/config.rb