Class: Rush::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/rush/path.rb

Overview

A tiny wrapper around ENV

Class Method Summary collapse

Class Method Details

.executablesObject



3
4
5
6
7
8
# File 'lib/rush/path.rb', line 3

def self.executables
  ENV['PATH'].split(':')
    .select { |f| ::File.directory?(f) }
    .map { |x| Rush::Dir.new(x).entries.map(&:name) }
    .flatten
end