class Darkroom::DuplicateAssetError

Error class used when an asset exists under multiple load paths.

Attributes

first_load_path[R]
path[R]
second_load_path[R]

Public Class Methods

new(path, first_load_path, second_load_path) click to toggle source

Creates a new instance.

  • path - Path of the asset that exists under multiple load paths.

  • first_load_path - Load path where the asset was first found.

  • second_load_path - Load path where the asset was subsequently found.

# File lib/darkroom/errors/duplicate_asset_error.rb, line 17
def initialize(path, first_load_path, second_load_path)
  @path = path
  @first_load_path = first_load_path
  @second_load_path = second_load_path
end

Public Instance Methods

to_s() click to toggle source

Returns a string representation of the error.

# File lib/darkroom/errors/duplicate_asset_error.rb, line 26
def to_s
  "Asset file exists in both #{@first_load_path} and #{@second_load_path}: #{@path}"
end