Sha256: 81fa29eb0bb1fe928423fb4936eba6b0e89bcfde4a4a1d08e657be6053ce90d6
Contents?: true
Size: 550 Bytes
Versions: 37
Compression:
Stored size: 550 Bytes
Contents
module Nanoc::Helpers # @see http://nanoc.ws/doc/reference/helpers/#childparent module ChildParent def parent_of(item) if item.identifier.legacy? item.parent else path_without_last_component = item.identifier.to_s.sub(/[^\/]+$/, '').chop @items[path_without_last_component + '.*'] end end def children_of(item) if item.identifier.legacy? item.children else pattern = item.identifier.without_ext + '/*' @items.find_all(pattern) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems