Sha256: dd3c96cfaa0a04ac6de8c6b81acfaec6caf9a3465adad4f5f6458f5a13809dca
Contents?: true
Size: 481 Bytes
Versions: 3
Compression:
Stored size: 481 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Common functionality for cops checking single/double quotes. module StringLiteralsHelp include StringHelp private def wrong_quotes?(node) src = node.source return false if src.start_with?('%', '?') if style == :single_quotes !double_quotes_required?(src) else !/" | \\[^'\\] | \#[@{$]/x.match?(src) end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems