Class: RuboCop::Cop::Sevencop::RSpecEmptyLineAfterLet
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Sevencop::RSpecEmptyLineAfterLet
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/sevencop/rspec_empty_line_after_let.rb
Overview
Insert empty line after ‘let`.
Since ‘let` defines a method, it should be written in the same style as `def`.
Constant Summary collapse
- MSG =
'Insert empty line after `let`.'
Instance Method Summary collapse
Instance Method Details
#on_block(node) ⇒ void
This method returns an undefined value.
45 46 47 48 49 50 51 |
# File 'lib/rubocop/cop/sevencop/rspec_empty_line_after_let.rb', line 45 def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler return unless bad?(node) add_offense(node) do |corrector| corrector.insert_after(node.location.end, "\n") end end |