Sha256: 8f3b0383ac8ad813128b05ad2bdc86f856e60732cd1963e961e6f7b664e269d5

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

module Rego
  Version = '4.2.0' unless defined?(Version)

  def self.version
    Rego::Version
  end

  def self.dependencies
    {
      'main' => ['main', ' ~> 6.3.0'],
      'map' => ['map', ' ~> 6.6.0'],
      'listen' => ['listen', ' ~> 3.9.0']
    }
  end

  def self.libdir(*args, &block)
    @libdir ||= File.basename(File.expand_path(__FILE__).sub(/\.rb$/, ''))
    args.empty? ? @libdir : File.join(@libdir, *args)
  ensure
    if block
      begin
        $LOAD_PATH.unshift(@libdir)
        block.call
      ensure
        $LOAD_PATH.shift
      end
    end
  end

  def self.load(*libs)
    libs = libs.join(' ').scan(/[^\s+]+/)
    Rego.libdir { libs.each { |lib| Kernel.load(lib) } }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rego-4.2.0 lib/rego/_lib.rb