Sha256: 42bd98d6a557f69c56bf92664087aa2ca1aa08838c0dfb086ad04133db17f1f7
Contents?: true
Size: 457 Bytes
Versions: 3
Compression:
Stored size: 457 Bytes
Contents
# frozen_string_literal: true module Rake module Funnel module Support class Which class << self def which(executable) return executable if File.file?(executable) ENV['PATH'] .split(File::PATH_SEPARATOR) .map { |path| File.join(path, executable) } .select { |path| File.file?(path) } .first end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rake-funnel-0.24.0 | lib/rake/funnel/support/which.rb |
rake-funnel-0.23.0 | lib/rake/funnel/support/which.rb |
rake-funnel-0.22.3 | lib/rake/funnel/support/which.rb |