Exception: Lookbook::LookbookError
- Inherits:
-
StandardError
- Object
- StandardError
- Lookbook::LookbookError
- Defined in:
- lib/lookbook/support/errors/lookbook_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #full_message ⇒ Object
-
#initialize(msg = nil, scope: nil, original: nil) ⇒ LookbookError
constructor
A new instance of LookbookError.
Constructor Details
#initialize(msg = nil, scope: nil, original: nil) ⇒ LookbookError
Returns a new instance of LookbookError.
5 6 7 8 9 10 |
# File 'lib/lookbook/support/errors/lookbook_error.rb', line 5 def initialize(msg = nil, scope: nil, original: nil) @scope = scope @original = original @message = msg super(msg) end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/lookbook/support/errors/lookbook_error.rb', line 3 def @message end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
3 4 5 |
# File 'lib/lookbook/support/errors/lookbook_error.rb', line 3 def original @original end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
3 4 5 |
# File 'lib/lookbook/support/errors/lookbook_error.rb', line 3 def scope @scope end |
Instance Method Details
#full_message ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/lookbook/support/errors/lookbook_error.rb', line 12 def if msg.nil? else scope_str = scope.nil? ? "[#{scope}]" : "" "#{scope_str} #{}".strip end end |