Class: Rubocop::Cop::MethodLength
- Inherits:
-
Cop
- Object
- Parser::AST::Processor
- Cop
- Rubocop::Cop::MethodLength
show all
- Defined in:
- lib/rubocop/cop/method_length.rb
Constant Summary
collapse
- MSG =
'Method has too many lines. [%d/%d]'
Instance Attribute Summary
Attributes inherited from Cop
#debug, #disabled_lines, #offences
Instance Method Summary
collapse
Methods inherited from Cop
#add_offence, cop_name, #has_report?, #ignore_node, inherited, #initialize, #inspect, #name, #on_comment
Instance Method Details
24
25
26
|
# File 'lib/rubocop/cop/method_length.rb', line 24
def
MethodLength.config['CountComments']
end
|
#max_length ⇒ Object
20
21
22
|
# File 'lib/rubocop/cop/method_length.rb', line 20
def max_length
MethodLength.config['Max']
end
|
#on_def(node) ⇒ Object
8
9
10
11
12
|
# File 'lib/rubocop/cop/method_length.rb', line 8
def on_def(node)
check(node)
super
end
|
#on_defs(node) ⇒ Object
14
15
16
17
18
|
# File 'lib/rubocop/cop/method_length.rb', line 14
def on_defs(node)
check(node)
super
end
|