lib/code_keeper/metrics/class_length.rb
def comment_line_count(node)
        node_range = node.first_line...node.last_line
        comment_lines = @ps.comments.map { |comment| comment.loc.line }
        # The latter condition considers a class ouside or above the node.
        comment_lines.select { |cl| !descendant_class_lines(node).include?(cl) && node_range.include?(cl) }.count
      end
# Only counts the comment of the class or module of a node.
# Because `#line_count_of_inner_nodes` only considers the first inner node,
# the second or later inner nodes' commments are not necesarry to be counted.
Only counts the comment of the class or module of a node.
Because `#line_count_of_inner_nodes` only considers the first inner node,
the second or later inner nodes' commments are not necesarry to be counted.
Only counts the comment of the class or module of a node . Because ` #line_count_of_inner_nodes ` only considers the first inner node the second or later inner nodes ' commments are not necesarry to be counted .
def comment_line_count(node)
        node_range = node.first_line...node.last_line
        comment_lines = @ps.comments.map { |comment| comment.loc.line }
        comment_lines.select { |cl| !descendant_class_lines(node).include?(cl) && node_range.include?(cl) }.count
      end
def comment_line_count ( node ) node_range = node . first_line ... node . last_line comment_lines = @ps . comments . map { | comment | comment . loc . line } comment_lines . select { | cl | ! descendant_class_lines ( node ) . include? ( cl ) && node_range . include? ( cl ) } . count end
Only counts the comment of the class or module of a node.
Only counts the comment of the class or module of a node .
# The latter condition considers a class ouside or above the node.
node