Class: RuboCop::Cop::RSpec::EmptyLineAfterHook
- Extended by:
- AutoCorrector
- Includes:
- EmptyLineSeparation
- Defined in:
- lib/rubocop/cop/rspec/empty_line_after_hook.rb
Overview
Checks if there is an empty line after hook blocks.
Constant Summary collapse
- MSG =
'Add an empty line after `%<hook>s`.'
Instance Method Summary collapse
Methods included from EmptyLineSeparation
#last_child?, #missing_separating_line, #missing_separating_line_offense, #offending_loc
Methods included from FinalEndLocation
Methods inherited from Base
inherited, #on_new_investigation
Methods included from RSpec::Language::NodePattern
Methods included from RSpec::Language
#example?, #example_group?, #example_group_with_body?, #hook?, #include?, #let?, #rspec?, #shared_group?, #spec_group?, #subject?
Instance Method Details
#on_block(node) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/rubocop/cop/rspec/empty_line_after_hook.rb', line 42 def on_block(node) return unless hook?(node) (node) do |method| format(MSG, hook: method) end end |