Method: Nanoc::Core::Pruner#pathname_components
- Defined in:
- lib/nanoc/core/pruner.rb
#pathname_components(pathname) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/nanoc/core/pruner.rb', line 44 def pathname_components(pathname) components = [] tmp = pathname loop do old = tmp components << File.basename(tmp) tmp = File.dirname(tmp) break if old == tmp end components.reverse end |