class RuboCop::Cop::Style::Encoding
def comments
def comments processed_source.lines.each.with_index.with_object({}) do |(line, line_number), comments| next if line.start_with?(SHEBANG) comment = MagicComment.parse(line) return comments unless comment.valid? comments[line_number + 1] = comment end end