lib/faster_path/optional/monkeypatches.rb in faster_path-0.2.0 vs lib/faster_path/optional/monkeypatches.rb in faster_path-0.2.1
- old
+ new
@@ -24,46 +24,51 @@
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
- def directory?
- FasterPath.directory?(@path)
+ def add_trailing_separator(pth)
+ FasterPath.add_trailing_separator(pth)
end
+ private :add_trailing_separator
+ def children(with_dir=true)
+ FasterPath.children(@path, with_dir)
+ end
+
def chop_basename(pth)
FasterPath.chop_basename(pth)
end
private :chop_basename
- def relative?
- FasterPath.relative?(@path)
+ def directory?
+ FasterPath.directory?(@path)
end
- def add_trailing_separator(pth)
- FasterPath.add_trailing_separator(pth)
+ def entries
+ FasterPath.entries(@path)
end
- private :add_trailing_separator
def has_trailing_separator?(pth)
FasterPath.has_trailing_separator?(pth)
end
private :has_trailing_separator?
- def entries
- FasterPath.entries(@path)
- end
-
def plus(pth, pth2)
FasterPath.plus(pth, pth2)
end
private :plus
+
+ def relative?
+ FasterPath.relative?(@path)
+ end
end
end
end
private_constant :MonkeyPatches