Class: Sevgi::Executor::Error
- Inherits:
-
Sevgi::Error
- Object
- Sevgi::Error
- Sevgi::Executor::Error
- Defined in:
- lib/sevgi/executor/error.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #backtrace! ⇒ Object
-
#initialize(error, scope) ⇒ Error
constructor
A new instance of Error.
- #stack ⇒ Object
Constructor Details
#initialize(error, scope) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 |
# File 'lib/sevgi/executor/error.rb', line 8 def initialize(error, scope) @error = error @scope = scope super(error.) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/sevgi/executor/error.rb', line 6 def error @error end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
6 7 8 |
# File 'lib/sevgi/executor/error.rb', line 6 def scope @scope end |
Instance Method Details
#backtrace! ⇒ Object
15 16 17 18 19 20 |
# File 'lib/sevgi/executor/error.rb', line 15 def backtrace! error .backtrace .select { |line| stack.any? { line.start_with?(::File.(it)) } } .map { |line| line.delete_prefix("#{::Dir.pwd}/") } end |
#stack ⇒ Object
22 |
# File 'lib/sevgi/executor/error.rb', line 22 def stack = scope.stack |