Exception: Darkroom::MissingLibraryError
- Inherits:
-
StandardError
- Object
- StandardError
- Darkroom::MissingLibraryError
- Defined in:
- lib/darkroom/errors/missing_library_error.rb
Overview
Error class used when a needed library cannot be loaded. See Asset#require_libs.
Instance Attribute Summary collapse
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#library ⇒ Object
readonly
Returns the value of attribute library.
-
#need ⇒ Object
readonly
Returns the value of attribute need.
Instance Method Summary collapse
-
#initialize(library, need, extension) ⇒ MissingLibraryError
constructor
Public: Create a new instance.
Constructor Details
#initialize(library, need, extension) ⇒ MissingLibraryError
Public: Create a new instance.
library - String name of the library that’s missing. need - Symbol or String reason the library is needed (:compile, :finalize, or :minify). extension - String extension of the type of asset that needs the library.
13 14 15 16 17 18 19 20 |
# File 'lib/darkroom/errors/missing_library_error.rb', line 13 def initialize(library, need, extension) super("Cannot #{need} #{extension} files: '#{library}' library not available [hint: try adding " \ "gem('#{library}') to your Gemfile]") @library = library @need = need @extension = extension end |
Instance Attribute Details
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
6 7 8 |
# File 'lib/darkroom/errors/missing_library_error.rb', line 6 def extension @extension end |
#library ⇒ Object (readonly)
Returns the value of attribute library.
6 7 8 |
# File 'lib/darkroom/errors/missing_library_error.rb', line 6 def library @library end |
#need ⇒ Object (readonly)
Returns the value of attribute need.
6 7 8 |
# File 'lib/darkroom/errors/missing_library_error.rb', line 6 def need @need end |