Class: RuboCop::Cop::Elegant::NoEmptyLinesInBlocks
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Elegant::NoEmptyLinesInBlocks
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb
Constant Summary collapse
- MSG =
'Empty line inside block body is not allowed'
Instance Method Summary collapse
- #on_block(node) ⇒ Object
- #on_case(node) ⇒ Object
- #on_case_match(node) ⇒ Object
- #on_for(node) ⇒ Object
- #on_if(node) ⇒ Object
- #on_kwbegin(node) ⇒ Object
- #on_new_investigation ⇒ Object
- #on_numblock(node) ⇒ Object
- #on_until(node) ⇒ Object
- #on_while(node) ⇒ Object
Instance Method Details
#on_block(node) ⇒ Object
20 21 22 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 20 def on_block(node) check(node) end |
#on_case(node) ⇒ Object
44 45 46 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 44 def on_case(node) check(node) end |
#on_case_match(node) ⇒ Object
48 49 50 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 48 def on_case_match(node) check(node) end |
#on_for(node) ⇒ Object
40 41 42 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 40 def on_for(node) check(node) end |
#on_if(node) ⇒ Object
28 29 30 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 28 def on_if(node) check(node) end |
#on_kwbegin(node) ⇒ Object
52 53 54 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 52 def on_kwbegin(node) check(node) end |
#on_new_investigation ⇒ Object
15 16 17 18 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 15 def on_new_investigation super @reported = [] end |
#on_numblock(node) ⇒ Object
24 25 26 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 24 def on_numblock(node) check(node) end |
#on_until(node) ⇒ Object
36 37 38 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 36 def on_until(node) check(node) end |
#on_while(node) ⇒ Object
32 33 34 |
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 32 def on_while(node) check(node) end |