class RuboCop::Cop::Metrics::MethodLength
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Constants
- LABEL
Public Instance Methods
on_block(node)
click to toggle source
# File lib/rubocop/cop/metrics/method_length.rb, line 18 def on_block(node) return unless node.send_node.method_name == :define_method check_code_length(node) end
on_def(node)
click to toggle source
# File lib/rubocop/cop/metrics/method_length.rb, line 13 def on_def(node) check_code_length(node) end
Also aliased as: on_defs
Private Instance Methods
cop_label()
click to toggle source
# File lib/rubocop/cop/metrics/method_length.rb, line 25 def cop_label LABEL end