Sha256: a52570a6155dfd4a704d7ccfee0454887cf08b3ee792d2d6e28c8a48510cff95
Contents?: true
Size: 500 Bytes
Versions: 197
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This autocorrects string literals class StringLiteralCorrector extend Util class << self def correct(corrector, node, style) return if node.dstr_type? 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
Version data entries
197 entries across 190 versions & 19 rubygems