Sha256: 9ffb1c3938a6a1997a77ed51e302d1e0152c7a543ab7cb12c981316ab47fd4f1
Contents?: true
Size: 489 Bytes
Versions: 13
Compression:
Stored size: 489 Bytes
Contents
module Nanoc::Int class PrefixedDataSource < Nanoc::DataSource def initialize(data_source, items_prefix, layouts_prefix) super({}, '/', '/', {}) @data_source = data_source @items_prefix = items_prefix @layouts_prefix = layouts_prefix end def items @data_source.items.map { |d| d.with_identifier_prefix(@items_prefix) } end def layouts @data_source.layouts.map { |d| d.with_identifier_prefix(@layouts_prefix) } end end end
Version data entries
13 entries across 13 versions & 1 rubygems