module Rubocop::Cop::SpaceAfterPunctuation

def autocorrect(token)

def autocorrect(token)
  @corrections << lambda do |corrector|
    corrector.insert_after(token.pos, ' ')
  end
end

def investigate(processed_source)

def investigate(processed_source)
  processed_source.tokens.each_cons(2) do |t1, t2|
    if kind(t1) && t1.pos.line == t2.pos.line &&
        t2.pos.column == t1.pos.column + offset(t1) &&
        t2.type != :tRPAREN
      add_offense(t1, t1.pos, format(MSG, kind(t1)))
    end
  end
end

def offset(token)

token where a space should be, is 1.
The normal offset, i.e., the distance from the punctuation
def offset(token)
  1
end