module Lazier::Pathname

Extensions for the `Pathname` class.

Public Instance Methods

components() click to toggle source

Returns all the components that are included in this path.

Pathname.new("/usr/bin/ruby").components
# => ["usr", "bin", "ruby"]

@return [Array] A list of all components that are included in this path.

# File lib/lazier/pathname.rb, line 17
def components
  each_filename.to_a
end