Class: RuboCop::Cop::Elegant::NoEmptyLinesInBlocks

Inherits:
Base
  • Object
show all
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

Instance Method Details

#on_block(node) ⇒ Object



21
22
23
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 21

def on_block(node)
  check(node)
end

#on_case(node) ⇒ Object



45
46
47
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 45

def on_case(node)
  check(node)
end

#on_case_match(node) ⇒ Object



49
50
51
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 49

def on_case_match(node)
  check(node)
end

#on_for(node) ⇒ Object



41
42
43
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 41

def on_for(node)
  check(node)
end

#on_if(node) ⇒ Object



29
30
31
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 29

def on_if(node)
  check(node)
end

#on_kwbegin(node) ⇒ Object



53
54
55
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 53

def on_kwbegin(node)
  check(node)
end

#on_new_investigationObject



15
16
17
18
19
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 15

def on_new_investigation
  super
  @reported = []
  @gaps = scan
end

#on_numblock(node) ⇒ Object



25
26
27
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 25

def on_numblock(node)
  check(node)
end

#on_until(node) ⇒ Object



37
38
39
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 37

def on_until(node)
  check(node)
end

#on_while(node) ⇒ Object



33
34
35
# File 'lib/rubocop/cop/elegant/no_empty_lines_in_blocks.rb', line 33

def on_while(node)
  check(node)
end