Exception: Jekyll::Diagrams::Errors::BasicError
- Inherits:
-
StandardError
- Object
- StandardError
- Jekyll::Diagrams::Errors::BasicError
- Defined in:
- lib/jekyll-diagrams/errors.rb
Instance Method Summary collapse
-
#initialize(val) ⇒ BasicError
constructor
A new instance of BasicError.
Constructor Details
#initialize(val) ⇒ BasicError
Returns a new instance of BasicError.
7 8 9 10 11 12 13 14 15 |
# File 'lib/jekyll-diagrams/errors.rb', line 7 def initialize(val) # Jekyll::...::CommandNotFoundError -> 'CommandNotFoundError' klass = self.class.name.split('::').last # 'CommandNotFound' -> 'Command Not Found' prefix = klass.sub(/Error$/, '').split(/(?=[A-Z])/).join(' ') # "Command Not Found: raw message" super("#{prefix}: #{val}") end |