Sha256: a79806ede5407c26610108345dcdb6eaa09eda813cc54c22a9d1b0104bf4a025

Contents?: true

Size: 611 Bytes

Versions: 3

Compression:

Stored size: 611 Bytes

Contents

Object.__send__(:remove_const, :VERSION) if Object.const_defined?(:VERSION)      # becuase Ruby 1.8~ gets in the way

module AE
  DIRECTORY = File.dirname(__FILE__)

  def self.package
    @package ||= (
      require 'yaml'
      YAML.load(File.new(DIRECTORY + '/package'))
    )
  end

  def self.profile
    @profile ||= (
      require 'yaml'
      YAML.load(File.new(DIRECTORY + '/profile'))
    )
  end

  def self.const_missing(name)
    key = name.to_s.downcase
    package[key] || profile[key] || super(name)
  end
end

require 'ae/assert'
require 'ae/expect'

# Copyright (c) 2008, 2010 Thomas Sawyer

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ae-1.6.1 lib/ae.rb
ae-1.6.0 lib/ae.rb
ae-1.5.0 lib/ae.rb