Class: Hike::Paths
- Inherits:
-
NormalizedArray
- Object
- Array
- NormalizedArray
- Hike::Paths
- Defined in:
- lib/hike/paths.rb
Instance Method Summary collapse
-
#initialize(root = ".") ⇒ Paths
constructor
A new instance of Paths.
- #normalize_element(path) ⇒ Object
Methods inherited from NormalizedArray
#<<, #[]=, #collect!, #insert, #normalize_elements, #push, #replace, #unshift
Constructor Details
Instance Method Details
#normalize_element(path) ⇒ Object
8 9 10 11 |
# File 'lib/hike/paths.rb', line 8 def normalize_element(path) path = File.join(@root, path) unless path[/^\//] File.(path) end |