Sha256: 2c11da5c62a2602bd0bd36b1ff7da220304fbffd7ef44a8c859ebb10bca35c2c
Contents?: true
Size: 472 Bytes
Versions: 23
Compression:
Stored size: 472 Bytes
Contents
# encoding: utf-8 module Nanoc::Extra module PathnameExtensions def components components = [] tmp = self loop do old = tmp components << File.basename(tmp) tmp = File.dirname(tmp) break if old == tmp end components.reverse end def include_component?(component) self.components.include?(component) end end end class ::Pathname include ::Nanoc::Extra::PathnameExtensions end
Version data entries
23 entries across 23 versions & 1 rubygems