Nanoc::CodeSnippet represent a piece of custom code of a nanoc site.
Creates a new code snippet.
@param [String] data The raw source code which will be executed before
compilation
@param [String] filename The filename corresponding to this code snippet
@param [Time, Hash] params Extra parameters. Ignored by nanoc; it is
only included for backwards compatibility.
# File lib/nanoc/base/source_data/code_snippet.rb, line 26 def initialize(data, filename, params=nil) @data = data @filename = filename end
@return [String] The checksum for this object. If its contents change,
the checksum will change as well.
# File lib/nanoc/base/source_data/code_snippet.rb, line 51 def checksum @data.checksum end
# File lib/nanoc/base/source_data/code_snippet.rb, line 45 def inspect "<#{self.class} filename=\"#{self.filename}\">" end
Generated with the Darkfish Rdoc Generator 2.