class RuboCop::Cop::Metrics::ModuleLength
This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Public Instance Methods
on_module(node)
click to toggle source
# File lib/rubocop/cop/metrics/module_length.rb, line 11 def on_module(node) check_code_length(node) end
Private Instance Methods
message(length, max_length)
click to toggle source
# File lib/rubocop/cop/metrics/module_length.rb, line 17 def message(length, max_length) format('Module has too many lines. [%d/%d]', length, max_length) end