Module: Lazier::Pathname
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/lazier/pathname.rb
Overview
Extensions for the Pathname class.
Instance Method Summary (collapse)
-
- (Array) components
Returns all the components that are included in this path.
Instance Method Details
- (Array) components
Returns all the components that are included in this path.
ruby
Pathname.new("/usr/bin/ruby").components
# => ["usr", "bin", "ruby"]
19 20 21 |
# File 'lib/lazier/pathname.rb', line 19 def components each_filename.to_a end |