lib/docrb/lib/docrb/ruby_parser.rb
def comment_for_line(line)
      return nil if line.zero? || line.negative?

      @comments.find { |c| c.loc.line == line }
    end
# Attempts to find a comment associated with a given line.
#
# line - Integer representing the line number to be checked for comments
#
# Returns a comment preceding the provided line, or nil, in case there's
# none.
Attempts to find a comment associated with a given line.
line - Integer representing the line number to be checked for comments

Returns a comment preceding the provided line, or nil, in case there's
none.
Attempts to find a comment associated with a given line . line - Integer representing the line number to be checked for comments Returns a comment preceding the provided line or nil in case there ' s none .
def comment_for_line(line)
      return nil if line.zero? || line.negative?
      @comments.find { |c| c.loc.line == line }
    end
def comment_for_line ( line ) return nil if line . zero? || line . negative? @comments . find { | c | c . loc . line == line } end
Attempts to find a comment associated with a given line.
Attempts to find a comment associated with a given line .
line