Sha256: d5f1b690bed686977e9c82d5a3a22850012521542ec777e3fcf98451fea8d089
Contents?: true
Size: 548 Bytes
Versions: 40
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This auto-corrects string literals class StringLiteralCorrector extend Util class << self def correct(node, style) return if node.dstr_type? lambda do |corrector| str = node.str_content if style == :single_quotes corrector.replace(node, to_string_literal(str)) else corrector.replace(node, str.inspect) end end end end end end end
Version data entries
40 entries across 40 versions & 5 rubygems