lib/nanoc3/base/data_source.rb in nanoc3-3.1.0a2 vs lib/nanoc3/base/data_source.rb in nanoc3-3.1.0a3
- old
+ new
@@ -25,34 +25,34 @@
# `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.
+ # should be mounted.
attr_reader :items_root
# @return [String] The root path where layouts returned by this data
- # source should be mounted.
+ # source should be mounted.
attr_reader :layouts_root
# @return [Hash] The configuration for this data source. For example,
- # online data sources could contain authentication details.
+ # online data sources could contain authentication details.
attr_reader :config
extend Nanoc3::PluginRegistry::PluginMethods
# Creates a new data source for the given site.
#
# @param [Nanoc3::Site] site The site this data source belongs to.
#
# @param [String] items_root The prefix that should be given to all items
- # returned by the #items method (comparable to mount points for
- # filesystems in Unix-ish OSes).
+ # returned by the #items method (comparable to mount points for
+ # filesystems in Unix-ish OSes).
#
# @param [String] layouts_root The prefix that should be given to all
- # layouts returned by the #layouts method (comparable to mount points
- # for filesystems in Unix-ish OSes).
+ # layouts returned by the #layouts method (comparable to mount points
+ # for filesystems in Unix-ish OSes).
#
# @param [Hash] config The configuration for this data source.
def initialize(site, items_root, layouts_root, config)
@site = site
@items_root = items_root
@@ -91,11 +91,11 @@
# Marks the data source as unused by the caller.
#
# Calling this method decreases the internal reference count. When the
# reference count reaches zero, i.e. when the data source is not used any
- # more, the data soruce will be unloaded ({#down} will be called).
+ # more, the data source will be unloaded ({#down} will be called).
#
# @return [void]
def unuse
@references -= 1
down if @references == 0
@@ -187,13 +187,13 @@
# @param [Hash] attributes
#
# @param [String] identifier
#
# @param [Hash] params Extra parameters to give to the data source. This
- # 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.
+ # 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={})
not_implemented('create_item')
end
@@ -210,12 +210,12 @@
# @param [Hash] attributes
#
# @param [String] identifier
#
# @param [Hash] params Extra parameters to give to the data source. This
- # 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.
+ # 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={})
not_implemented('create_layout')
end