Sha256: 8b0ba0c5ec846eab2ada3dded96e93225eff6d2e32e600ec19ff4683884475ad
Contents?: true
Size: 235 Bytes
Versions: 227
Compression:
Stored size: 235 Bytes
Contents
# frozen_string_literal: true require 'pathname' class Pathname # Apply .parent n times. # @return [Pathname] def parent_n(n) # rubocop:disable Naming/MethodParameterName n.times.inject(self) { |a, _e| a.parent } end end
Version data entries
227 entries across 227 versions & 4 rubygems