lib/nanoc3/base/source_data/code_snippet.rb in nanoc3-3.2.0a2 vs lib/nanoc3/base/source_data/code_snippet.rb in nanoc3-3.2.0a3
- old
+ new
@@ -20,23 +20,14 @@
# @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. For backwards
- # compatibility, this can be a Time instance indicating the time when
- # this code snippet was last modified (mtime).
- #
- # @option params [Time, nil] :mtime (nil) The time when this code snippet
- # was last modified
+ # @param [Time, Hash] params Extra parameters. Ignored by nanoc; it is
+ # only included for backwards compatibility.
def initialize(data, filename, params=nil)
- # Parse params
- params ||= {}
- params = { :mtime => params } if params.is_a?(Time)
-
@data = data
@filename = filename
- @mtime = params[:mtime]
end
# Loads the code by executing it.
#
# @return [void]