Sha256: 6c696ab309df3e17f79adbf9d4ae408bbcb330842dedc47008b24389efc46745
Contents?: true
Size: 520 Bytes
Versions: 16
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true 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
16 entries across 16 versions & 1 rubygems