Methods

Class/Module Index [+]

Quicksearch

Nanoc3::Errors::DataNotYetAvailable

Error that is raised when data is requested when the data is not yet available (possibly due to a missing {Nanoc3::Site#load_data}).

Public Class Methods

new(type, plural) click to toggle source

@param [String] type The name of the data type that is not yet available. For example: `“site”`, `“items”`.

@param [Boolean] plural True if the given type is plural, false otherwise. This only has an effect on the exception message. For example, if the given type is `“site”`, plural would be `false`; if the given type is `“items”`, plural would be `true`.

# File lib/nanoc3/base/errors.rb, line 71
def initialize(type, plural)
  super("#{type} #{plural ? 'are' : 'is'} not available yet. You may be missing a Nanoc3::Site#load_data call.".make_compatible_with_env)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.