Method: Nanoc::Core::CodeSnippet#initialize

Defined in:
lib/nanoc/core/code_snippet.rb

#initialize(data, filename) ⇒ CodeSnippet

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a new code snippet.

Parameters:

  • data (String)

    The raw source code which will be executed before compilation

  • filename (String)

    The filename corresponding to this code snippet



28
29
30
31
# File 'lib/nanoc/core/code_snippet.rb', line 28

def initialize(data, filename)
  @data     = data
  @filename = filename
end