Exception: Darkroom::DuplicateAssetError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/darkroom/errors/duplicate_asset_error.rb

Overview

Error class used when the same asset path exists under multiple load paths.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, first_load_path, second_load_path) ⇒ DuplicateAssetError

Public: Create a new instance.

path - String path of the asset that exists under multiple load paths. first_load_path - String load path where the asset was first found. second_load_path - String load path where the asset was subsequently found.



13
14
15
16
17
18
19
# File 'lib/darkroom/errors/duplicate_asset_error.rb', line 13

def initialize(path, first_load_path, second_load_path)
  super("Asset file exists in both #{first_load_path} and #{second_load_path}: #{path}")

  @path = path
  @first_load_path = first_load_path
  @second_load_path = second_load_path
end

Instance Attribute Details

#first_load_pathObject (readonly)

Returns the value of attribute first_load_path.



6
7
8
# File 'lib/darkroom/errors/duplicate_asset_error.rb', line 6

def first_load_path
  @first_load_path
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/darkroom/errors/duplicate_asset_error.rb', line 6

def path
  @path
end

#second_load_pathObject (readonly)

Returns the value of attribute second_load_path.



6
7
8
# File 'lib/darkroom/errors/duplicate_asset_error.rb', line 6

def second_load_path
  @second_load_path
end