lib/faster_path/optional/monkeypatches.rb in faster_path-0.2.2 vs lib/faster_path/optional/monkeypatches.rb in faster_path-0.2.3
- old
+ new
@@ -23,10 +23,12 @@
raise TypeError unless pth.is_a? String
FasterPath.dirname(pth)
end
end
end
+
+ # rubocop:disable Metrics/MethodLength
def self._ruby_library_pathname!
::Pathname.class_eval do
def absolute?
FasterPath.absolute?(@path)
end
@@ -43,9 +45,14 @@
def chop_basename(pth)
FasterPath.chop_basename(pth)
end
private :chop_basename
+
+ def cleanpath_aggressive
+ Pathname.new(FasterPath.cleanpath_aggressive(@path))
+ end
+ private :cleanpath_aggressive
def directory?
FasterPath.directory?(@path)
end