GithubHelp home page GithubHelp logo

isabella232 / hike Goto Github PK

View Code? Open in Web Editor NEW

This project forked from widgetworks/hike

0.0 0.0 0.0 100 KB

A Ruby library for finding files in a set of paths

License: MIT License

Ruby 100.00%

hike's Introduction

Hike

Hike is a Ruby library for finding files in a set of paths. Use it to implement search paths, load paths, and the like.

Examples

Find Ruby files in this project:

trail = Hike::Trail.new "/Users/sam/Projects/hike"
trail.append_extension ".rb"
trail.append_paths "lib", "test"

trail.find "hike/trail"
# => "/Users/sam/Projects/hike/lib/hike/trail.rb"

trail.find "test_trail"
# => "/Users/sam/Projects/hike/test/test_trail.rb"

Explore your Ruby load path:

trail = Hike::Trail.new "/"
trail.append_extensions ".rb", ".bundle"
trail.append_paths *$:

trail.find "net/http"
# => "/Users/sam/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/net/http.rb"

trail.find "strscan"
# => "/Users/sam/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0/strscan.bundle"

Explore your shell path:

trail = Hike::Trail.new "/"
trail.append_paths *ENV["PATH"].split(":")

trail.find "ls"
# => "/bin/ls"

trail.find "gem"
# => "/Users/sam/.rvm/rubies/ree-1.8.7-2010.02/bin/gem"

Installation

$ gem install hike

License

Copyright (c) 2011 Sam Stephenson.

Released under the MIT license. See LICENSE for details.

hike's People

Contributors

josh avatar sstephenson avatar alexcrichton avatar amitkaz avatar bjfish avatar jordimassaguerpla avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.