Class: Klenod::Runtime::BacktraceRewriter::ParsedBacktraceEntry
- Inherits:
-
Data
- Object
- Data
- Klenod::Runtime::BacktraceRewriter::ParsedBacktraceEntry
- Defined in:
- lib/klenod/runtime/backtrace_rewriter.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description
19 20 21 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 19 def description @description end |
#file ⇒ Object (readonly)
Returns the value of attribute file
19 20 21 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 19 def file @file end |
#line ⇒ Object (readonly)
Returns the value of attribute line
19 20 21 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 19 def line @line end |
Class Method Details
.parse(line) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 21 def self.parse(line) case line in BacktraceString line.parsed_backtrace_entry in /\A(?<file>.*):(?<line>\d+):in '(?<description>.*)'\z/ new($~[:file], $~[:line].to_i, $~[:description]) else nil end end |
Instance Method Details
#to_backtrace_string ⇒ Object
36 37 38 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 36 def to_backtrace_string BacktraceString.new(self) end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/klenod/runtime/backtrace_rewriter.rb', line 32 def to_s "#{file}:#{line}:in '#{description}'" end |