Sha256: 23e187a791581b58955a99f79c7f396dea7167c67a0b17d80e00e76b917ab68f

Contents?: true

Size: 383 Bytes

Versions: 6888

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    # Common functionality for handling parentheses.
    module Parentheses
      private

      def parens_required?(node)
        range  = node.source_range
        source = range.source_buffer.source
        source[range.begin_pos - 1] =~ /[a-z]/ ||
          source[range.end_pos] =~ /[a-z]/
      end
    end
  end
end

Version data entries

6,888 entries across 6,863 versions & 30 rubygems

Version Path
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.74.0 lib/rubocop/cop/mixin/parentheses.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.73.0 lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/parentheses.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.72.0 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.71.0 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.70.0 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.69.0 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.68.1 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.68.0 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.67.2 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.67.1 lib/rubocop/cop/mixin/parentheses.rb
rubocop-0.67.0 lib/rubocop/cop/mixin/parentheses.rb