class RuboCop::Cop::Layout::SpaceBeforeSemicolon

Checks for semicolon (;) preceded by space.

@example

# bad
x = 1 ; y = 2

# good
x = 1; y = 2

Public Instance Methods

autocorrect(space) click to toggle source
# File lib/rubocop/cop/layout/space_before_semicolon.rb, line 17
def autocorrect(space)
  PunctuationCorrector.remove_space(space)
end
kind(token) click to toggle source
# File lib/rubocop/cop/layout/space_before_semicolon.rb, line 21
def kind(token)
  'semicolon' if token.semicolon?
end