Sha256: 6f89b4fb0a1f05a04c61c86b278f3611c336affa8363a3733aec2d03abbe6c9c
Contents?: true
Size: 501 Bytes
Versions: 49
Compression:
Stored size: 501 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This auto-corrects 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
49 entries across 49 versions & 6 rubygems