class RuboCop::Cop::Layout::SpaceAfterSemicolon
Checks for semicolon (‘;`) not followed by some kind of space.
@example
# bad x = 1;y = 2 # good x = 1; y = 2
Public Instance Methods
Source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 23 def kind(token) 'semicolon' if token.semicolon? end
Source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 27 def space_missing?(token1, token2) super && !semicolon_sequence?(token1, token2) end
Calls superclass method
RuboCop::Cop::SpaceAfterPunctuation#space_missing?
Source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 18 def space_style_before_rcurly cfg = config.for_cop('Layout/SpaceInsideBlockBraces') cfg['EnforcedStyle'] || 'space' end
Private Instance Methods
Source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 33 def semicolon_sequence?(token, next_token) token.semicolon? && next_token.semicolon? end