Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

freeformz/rwhich

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Based on tenderlove's #which http://tenderlovemaking.com/2011/12/05/profiling-rails-startup-with-dtrace/

Base Use:
> require 'rwhich/file'
> File.which 'ls'
=> "/bin/ls"
> File.which 'hahahahahah' #assuming you don't have a hahahahahah executable in ENV['PATH']
=> nil

Other Use:
> require 'rwhich'
> Class Foo
    extend RWhich
  end
> Foo.which 'ls'
=> "/bin/ls"
> Class Bar
    include RWhich
  end
> bar = Bar.new
> bar.which 'ls'
=> "/bin/ls"

Releases

No releases published

Packages

No packages published

Languages