Exception: FilePipeline::Errors::MisplacedVersionFileError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/file_pipeline/errors/misplaced_version_file_error.rb

Overview

Error class for exceptions that are raised when a new version is added, but the file is not in the VersionedFile’s working directory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, file: nil, directory: nil) ⇒ MisplacedVersionFileError

Returns a new instance of MisplacedVersionFileError.



15
16
17
18
19
20
# 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

Instance Attribute Details

#directoryObject (readonly)

Path for the directory where the file should have been (the VersionedFile’s working directory).



13
14
15
# File 'lib/file_pipeline/errors/misplaced_version_file_error.rb', line 13

def directory
  @directory
end

#fileObject (readonly)

Path for of the misplaced file for the version.



9
10
11
# File 'lib/file_pipeline/errors/misplaced_version_file_error.rb', line 9

def file
  @file
end