Sha256: 9315d8b9d53d75c387ad9136f2d2f5c72de4858a0a8c5eb0f282f8375deb6338
Contents?: true
Size: 617 Bytes
Versions: 7
Compression:
Stored size: 617 Bytes
Contents
require 'rbconfig' module Rabbit module Config IMAGE_PATH = [ RbConfig::CONFIG["datadir"], File.join(".", "data"), ] append_path_from_gem = lambda do return unless Object.const_defined?(:Gem) rabbit_gem_spec = Gem.loaded_specs["rabbit"] return if rabbit_gem_spec.nil? unless rabbit_gem_spec.respond_to?(:activated?) def rabbit_gem_spec.activated? loaded? end end if rabbit_gem_spec.activated? IMAGE_PATH.unshift(File.join(rabbit_gem_spec.full_gem_path, "data")) end end append_path_from_gem.call end end
Version data entries
7 entries across 7 versions & 1 rubygems