Sha256: 484f24b1bda949f3c851dc9a07ab386717ddaa9be484b26ee011faf069964df5
Contents?: true
Size: 729 Bytes
Versions: 15
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true module Nanoc class PostCompileItemRepView < ::Nanoc::ItemRepView def compiled_content(snapshot: nil) snapshot_contents = @context.compilation_context.compiled_content_cache[unwrap] snapshot_name = snapshot || (snapshot_contents[:pre] ? :pre : :last) unless snapshot_contents[snapshot_name] raise Nanoc::Int::Errors::NoSuchSnapshot.new(unwrap, snapshot_name) end content = snapshot_contents[snapshot_name] if content.binary? raise Nanoc::Int::Errors::CannotGetCompiledContentOfBinaryItem.new(unwrap) end content.string end def raw_path(snapshot: :last) @item_rep.raw_path(snapshot: snapshot) end end end
Version data entries
15 entries across 15 versions & 1 rubygems