Class: Debtective::Comments::Comment::Yard

Inherits:
Base
  • Object
show all
Defined in:
lib/debtective/comments/comment/yard.rb

Overview

Hold YARD comment information

Constant Summary

Constants inherited from Base

Base::REGULAR_COMMENT

Instance Attribute Summary

Attributes inherited from Base

#pathname

Instance Method Summary collapse

Methods inherited from Base

#comment_start, #commit, #days, #initialize, #location, #to_h, #type

Constructor Details

This class inherits a constructor from Debtective::Comments::Comment::Base

Instance Method Details

#comment_endInteger

Returns:

  • (Integer)


12
13
14
# File 'lib/debtective/comments/comment/yard.rb', line 12

def comment_end
  @index
end

#statement_endInteger

Returns:

  • (Integer)


22
23
24
# File 'lib/debtective/comments/comment/yard.rb', line 22

def statement_end
  FindEndOfStatement.new(lines: lines, first_line_index: statement_start).call
end

#statement_startInteger

Returns:

  • (Integer)


17
18
19
# File 'lib/debtective/comments/comment/yard.rb', line 17

def statement_start
  last_following_comment_index.next
end