class RuboCop::Cop::Metrics::ClassLength

The maximum allowed length is configurable.
Comment lines can optionally be ignored.
This cop checks if the length a class exceeds some maximum value.

def message(length, max_length)

def message(length, max_length)
  format('Class has too many lines. [%d/%d]', length, max_length)
end

def on_class(node)

def on_class(node)
  check_code_length(node)
end