class FilePipeline::Errors::MisplacedVersionFileError
Error class for exceptions that are raised when a new version is added, but the file is not in the VersionedFile's working directory.
Attributes
directory[R]
Path for the directory where the file should have been (the VersionedFile's working directory).
file[R]
Path for of the misplaced file for the version.
Public Class Methods
new(msg = nil, file: nil, directory: nil)
click to toggle source
Calls superclass method
# File lib/file_pipeline/errors/misplaced_version_file_error.rb, line 15 def initialize(msg = nil, file: nil, directory: nil) @file = file @directory = directory msg ||= default_message super msg end
Private Instance Methods
default_message()
click to toggle source
# File lib/file_pipeline/errors/misplaced_version_file_error.rb, line 24 def default_message "File #{File.basename @file} was expected in #{@directory},"\ " but was in #{File.dirname @file}." end