Sha256: 16466508c73d487f20b26d68a7e071f1e701c54a7d4e6dc9af8a15311ba434b6
Contents?: true
Size: 831 Bytes
Versions: 10
Compression:
Stored size: 831 Bytes
Contents
module Nanoc3 # Nanoc3::PreprocessorContext provides a context in which preprocessing code # can be executed. It provides access to the site and its configuration, # items and layouts. class PreprocessorContext # Creates a new preprocessor context for the given site. def initialize(site) @site = site end # The site for which the preprocessor code is being executed. def site @site end # The configuration of the site for which the preprocessor code is being # executed. def config site.config end # The items in the site for which the preprocessor code is being executed. def items site.items end # The layouts in the site for which the preprocessor code is being # executed. def layouts site.layouts end end end
Version data entries
10 entries across 10 versions & 1 rubygems