Exception: Darkroom::InvalidPathError
- Inherits:
-
StandardError
- Object
- StandardError
- Darkroom::InvalidPathError
- Defined in:
- lib/darkroom/errors/invalid_path_error.rb
Overview
Error class used when an asset’s path contains one or more invalid characters.
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, index) ⇒ InvalidPathError
constructor
Public: Create a new instance.
Constructor Details
#initialize(path, index) ⇒ InvalidPathError
Public: Create a new instance.
path - Path of the asset with the invalid character(s). index - Position of the first bad character in the path.
14 15 16 17 18 19 |
# File 'lib/darkroom/errors/invalid_path_error.rb', line 14 def initialize(path, index) super("Asset path contains one or more invalid characters (#{Asset::DISALLOWED_PATH_CHARS}): #{path}") @path = path @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
8 9 10 |
# File 'lib/darkroom/errors/invalid_path_error.rb', line 8 def index @index end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/darkroom/errors/invalid_path_error.rb', line 8 def path @path end |