Sha256: a8a056ee47e88e65186d0f95dc15dbc06f9e0d737ce3b41dbb7c7a559308c5d3

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 Bytes

Contents

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

module Malt

  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

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
malt-0.3.0 lib/malt/meta/data.rb
malt-0.3.0 meta/data.rb
malt-0.2.0 lib/malt/meta/data.rb
malt-0.2.0 meta/data.rb