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

autocorrect(semicolon) click to toggle source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 17
def autocorrect(semicolon)
  PunctuationCorrector.add_space(semicolon)
end
kind(token) click to toggle source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 26
def kind(token)
  'semicolon' if token.semicolon?
end
space_style_before_rcurly() click to toggle source
# File lib/rubocop/cop/layout/space_after_semicolon.rb, line 21
def space_style_before_rcurly
  cfg = config.for_cop('Layout/SpaceInsideBlockBraces')
  cfg['EnforcedStyle'] || 'space'
end