Sha256: d5d6811a874bafed6435a8a4eacda54080c1a8c3e77dbcadd629f9531216bb5d

Contents?: true

Size: 426 Bytes

Versions: 28

Compression:

Stored size: 426 Bytes

Contents

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

28 entries across 28 versions & 1 rubygems

Version Path
rake-funnel-0.9.1.pre lib/rake/funnel/support/which.rb
rake-funnel-0.9.0.pre lib/rake/funnel/support/which.rb
rake-funnel-0.8.0.pre lib/rake/funnel/support/which.rb
rake-funnel-0.7.0.pre lib/rake/funnel/support/which.rb
rake-funnel-0.6.1.pre lib/rake/funnel/support/which.rb
rake-funnel-0.6.0.pre lib/rake/funnel/support/which.rb
rake-funnel-0.5.0.pre lib/rake/funnel/support/which.rb
rake-funnel-0.4.0.pre lib/rake/funnel/support/which.rb