Class: Opal::HikePathFinder
- Inherits:
-
Hike::Trail
- Object
- Hike::Trail
- Opal::HikePathFinder
- Defined in:
- opal/lib/opal/hike_path_finder.rb
Instance Method Summary collapse
- #find(path) ⇒ Object
-
#initialize(paths = Opal.paths) ⇒ HikePathFinder
constructor
A new instance of HikePathFinder.
Constructor Details
#initialize(paths = Opal.paths) ⇒ HikePathFinder
Returns a new instance of HikePathFinder
6 7 8 9 10 |
# File 'opal/lib/opal/hike_path_finder.rb', line 6 def initialize(paths = Opal.paths) super() append_paths(*paths) append_extensions '.js', '.js.rb', '.rb', '.opalerb' end |
Instance Method Details
#find(path) ⇒ Object
12 13 14 15 16 |
# File 'opal/lib/opal/hike_path_finder.rb', line 12 def find path pathname = Pathname(path) return path if pathname.absolute? and pathname.exist? super end |