Class: Debtective::Comments::FindEndOfStatement
- Inherits:
-
Object
- Object
- Debtective::Comments::FindEndOfStatement
- Defined in:
- lib/debtective/comments/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.
Constructor Details
#initialize(lines:, first_line_index:) ⇒ FindEndOfStatement
Returns a new instance of FindEndOfStatement.
23 24 25 26 |
# File 'lib/debtective/comments/find_end_of_statement.rb', line 23 def initialize(lines:, first_line_index:) @lines = lines @first_line_index = first_line_index end |
Instance Method Details
#call ⇒ Integer
Note:
suppress_stderr prevents outputs from RubyVM::InstructionSequence.compile
Returns index of the line ending the statement.
30 31 32 |
# File 'lib/debtective/comments/find_end_of_statement.rb', line 30 def call last_line_index end |