lib/nanoc/base/source_data/data_source.rb in nanoc-3.7.4 vs lib/nanoc/base/source_data/data_source.rb in nanoc-3.7.5
- old
+ new
@@ -1,9 +1,8 @@
# encoding: utf-8
module Nanoc
-
# Responsible for loading site data. It is the (abstract) superclass for all
# data sources. Subclasses must at least implement the data reading methods
# ({#items} and {#layouts}); all other methods involving data manipulation
# are optional.
#
@@ -24,11 +23,10 @@
# the data source should support creating items and layouts using the
# `create_item` and `create_layout` CLI commands, the {#setup},
# {#create_item} and {#create_layout} methods should be implemented as
# well.
class DataSource
-
# @return [String] The root path where items returned by this data source
# should be mounted.
attr_reader :items_root
# @return [String] The root path where layouts returned by this data
@@ -205,11 +203,11 @@
# can be used to influence the way items are stored. For example,
# filesystem data sources could use this to pass the extension of the
# files that should be generated.
#
# @return [void]
- def create_item(_content, _attributes, _identifier, _params = {})
+ def create_item(content, attributes, identifier, params = {}) # rubocop:disable Lint/UnusedMethodArgument
not_implemented('create_item')
end
# Creates a new layout with the given content, attributes and identifier.
# No instance of {Nanoc::Layout} will be created; this method creates the
@@ -228,19 +226,18 @@
# can be used to influence the way items are stored. For example,
# filesystem data sources could use this to pass the extension of the
# files that should be generated.
#
# @return [void]
- def create_layout(_content, _attributes, _identifier, _params = {})
+ def create_layout(content, attributes, identifier, params = {}) # rubocop:disable Lint/UnusedMethodArgument
not_implemented('create_layout')
end
private
def not_implemented(name)
raise NotImplementedError.new(
"#{self.class} does not implement ##{name}"
)
end
-
end
end