lib/nanoc/base/store.rb in nanoc-3.8.0 vs lib/nanoc/base/store.rb in nanoc-4.0.0a1
- old
+ new
@@ -1,8 +1,8 @@
# encoding: utf-8
-module Nanoc
+module Nanoc::Int
# An abstract superclass for classes that need to store data to the
# filesystem, such as checksums, cached compiled content and dependency
# graphs.
#
# Each store has a version number. When attempting to load data from a store
@@ -40,20 +40,20 @@
# @return The data that should be written to the disk
#
# @abstract This method must be implemented by the subclass.
def data
- raise NotImplementedError.new('Nanoc::Store subclasses must implement #data and #data=')
+ raise NotImplementedError.new('Nanoc::Int::Store subclasses must implement #data and #data=')
end
# @param new_data The data that has been loaded from the disk
#
# @abstract This method must be implemented by the subclass.
#
# @return [void]
def data=(new_data) # rubocop:disable Lint/UnusedMethodArgument
- raise NotImplementedError.new('Nanoc::Store subclasses must implement #data and #data=')
+ raise NotImplementedError.new('Nanoc::Int::Store subclasses must implement #data and #data=')
end
# Loads the data from the filesystem into memory. This method will set the
# loaded data using the {#data=} method.
#
@@ -89,11 +89,9 @@
load
end
end
# Undoes the effects of {#load}. Used when {#load} raises an exception.
- #
- # @api private
def unload
end
# Stores the data contained in memory to the filesystem. This method will
# use the {#data} method to fetch the data that should be written.