Sha256: 131fb4322bc53457edb45740b4c9a84b6664fb2f4e0a7cb15d64bc895d2ba941

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

require 'yaml'

module QED
  DIRECTORY = File.dirname(__FILE__) + '/qed'

  PROFILE = YAML.load(File.new(DIRECTORY + '/profile.yml')) rescue {}
  PACKAGE = YAML.load(File.new(DIRECTORY + '/package.yml')) rescue {}

  VERSION = PACKAGE.values_at('major','minor','patch','build').compact.join('.')

  #
  def self.const_missing(name)
    key = name.to_s.downcase
    if PACKAGE.key?(key)
      PACKAGE[key]
    elsif PROFILE.key?(key)
      PROFILE[key]
    else
      super(name)
    end
  end
end

require 'qed/session'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qed-2.2.1 lib/qed.rb
qed-2.2.0 lib/qed.rb