Sha256: d10db1af70fc7c4999118fefbcdfebb79aae899d5919d03b6f7f85766bc5c760

Contents?: true

Size: 549 Bytes

Versions: 6

Compression:

Stored size: 549 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true
begin
  class RuboCop::Cop::Style::SpaceAroundOperators
    def on_send(node)
      if node.loc.operator # aref assignment, attribute assignment
        on_special_asgn(node)
      elsif !node.unary_operation? && !called_with_dot?(node)
        op = node.method_name
        if op != :[] && op != :! && op != :[]= && op != :& && operator?(op)
          _, _, right, = *node
          check_operator(node.loc.selector, right.source_range)
        end
      end
    end
  end
rescue NameError
  nil
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fancy_to_proc-0.4.0 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb
fancy_to_proc-0.3.1 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb
fancy_to_proc-0.3.0 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb
fancy_to_proc-0.2.1 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb
fancy_to_proc-0.2.0 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb
fancy_to_proc-0.1.1 lib/rubocop/cop/fancy_to_proc/space_around_most_operators.rb