Sha256: f31d8c427be5ea52b81620acd8ca4f2ec86ca845b5d37316007bef96db886133
Contents?: true
Size: 501 Bytes
Versions: 2
Compression:
Stored size: 501 Bytes
Contents
require "bundlegem/version" module Bundlegem # Your code goes here... class << self def which(executable) if File.file?(executable) && File.executable?(executable) executable elsif ENV['PATH'] path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p| abs_path = File.join(p, executable) File.file?(abs_path) && File.executable?(abs_path) end path && File.expand_path(executable, path) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bundlegem-0.0.2 | lib/bundlegem.rb |
bundlegem-0.0.1 | lib/bundlegem.rb |