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

Version Path
nanoc-4.7.9 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.8 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.7 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.6 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.5 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.4 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.3 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.2 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.1 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.7.0 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.6.4 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.6.3 lib/nanoc/base/repos/prefixed_data_source.rb
nanoc-4.6.2 lib/nanoc/base/repos/prefixed_data_source.rb