Class: Zikrash::CodeExtractor
- Inherits:
-
Object
- Object
- Zikrash::CodeExtractor
- Defined in:
- lib/zikrash/code_extractor.rb
Instance Attribute Summary collapse
-
#file_location ⇒ Object
Returns the value of attribute file_location.
-
#line_number ⇒ Object
Returns the value of attribute line_number.
Instance Method Summary collapse
-
#initialize(backtrace_line) ⇒ CodeExtractor
constructor
A new instance of CodeExtractor.
- #result ⇒ Object
Constructor Details
#initialize(backtrace_line) ⇒ CodeExtractor
Returns a new instance of CodeExtractor.
8 9 10 11 12 |
# File 'lib/zikrash/code_extractor.rb', line 8 def initialize(backtrace_line) self.file_location = "#{Rails.root}/#{backtrace_line.split(':')[0]}" self.line_number = backtrace_line.split(':')[1].to_i self end |
Instance Attribute Details
#file_location ⇒ Object
Returns the value of attribute file_location.
5 6 7 |
# File 'lib/zikrash/code_extractor.rb', line 5 def file_location @file_location end |
#line_number ⇒ Object
Returns the value of attribute line_number.
6 7 8 |
# File 'lib/zikrash/code_extractor.rb', line 6 def line_number @line_number end |
Instance Method Details
#result ⇒ Object
14 15 16 |
# File 'lib/zikrash/code_extractor.rb', line 14 def result retrieve_code_lines end |