Class: Debtective::FindEndOfStatement
- Inherits:
-
Object
- Object
- Debtective::FindEndOfStatement
- Includes:
- StderrHelper
- Defined in:
- lib/debtective/find_end_of_statement.rb
Overview
Find the index of the line ending a statement
Instance Method Summary collapse
-
#call ⇒ Integer
index of the line ending the statement.
-
#initialize(lines, first_line_index) ⇒ FindEndOfStatement
constructor
A new instance of FindEndOfStatement.
Methods included from StderrHelper
Constructor Details
#initialize(lines, first_line_index) ⇒ FindEndOfStatement
Returns a new instance of FindEndOfStatement.
26 27 28 29 |
# File 'lib/debtective/find_end_of_statement.rb', line 26 def initialize(lines, first_line_index) @lines = lines @first_line_index = first_line_index end |
Instance Method Details
#call ⇒ Integer
Note:
use suppress_stderr to prevent error outputs from RubyVM::InstructionSequence.compile
index of the line ending the statement
35 36 37 |
# File 'lib/debtective/find_end_of_statement.rb', line 35 def call suppress_stderr { last_line_index } end |