Exception: Darkroom::DuplicateAssetError
- Inherits:
-
StandardError
- Object
- StandardError
- Darkroom::DuplicateAssetError
- 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
-
#first_load_path ⇒ Object
readonly
Returns the value of attribute first_load_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#second_load_path ⇒ Object
readonly
Returns the value of attribute second_load_path.
Instance Method Summary collapse
-
#initialize(path, first_load_path, second_load_path) ⇒ DuplicateAssetError
constructor
Public: Create a new instance.
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_path ⇒ Object (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 |
#path ⇒ Object (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_path ⇒ Object (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 |