Sha256: 1fdad2f654e53b6452da49c74904582ab12fc375beec8c6f71a3cb9154a5032f

Contents?: true

Size: 514 Bytes

Versions: 1

Compression:

Stored size: 514 Bytes

Contents

module FasterPath
  def self.sledgehammer_everything!
    ::File.class_eval do
      def basename(pth)
        FasterPath.basename(pth)
      end 
    end 

    ::Pathname.class_eval do
      def absolute?
        FasterPath.absolute?(@path)
      end

      def directory?
        FasterPath.directory?(@path)
      end

      def chop_basename(pth)
        FasterPath.chop_basename(pth)
      end
      private :chop_basename

      def relative?
        FasterPath.relative?(@path)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faster_path-0.1.6 lib/faster_path/optional/monkeypatches.rb