Sha256: 0f0393c952f3dd8c1d49cd24d2ad7beed342f49339ac9a7d372bc972be5e8b75
Contents?: true
Size: 698 Bytes
Versions: 6
Compression:
Stored size: 698 Bytes
Contents
# encoding: utf-8 # # This file is part of the lazier gem. Copyright (C) 2012 and above Shogun <shogun_panda@me.com>. # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # module Lazier # Extensions for the Pathname class. module Pathname extend ::ActiveSupport::Concern # Returns all the components that are included in this path. # # ```ruby # Pathname.new("/usr/bin/ruby").components # # => ["usr", "bin", "ruby"] # ``` # # @return [Array] A list of all components that are included in this path. def components rv = [] self.each_filename { |p| rv << p } rv end end end
Version data entries
6 entries across 6 versions & 1 rubygems