Sha256: 9a2712ae06f01d9dc810a6a4c8819cf45bc4069913430a82f122f8387eb0a6be

Contents?: true

Size: 585 Bytes

Versions: 7149

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    class VariableForce
      # Mix-in module for classes which own a node and need branch information
      # of the node. The user classes must implement #node and #scope.
      module Branchable
        def branch
          return @branch if instance_variable_defined?(:@branch)

          @branch = Branch.of(node, scope: scope)
        end

        def run_exclusively_with?(other)
          return false if !branch || !other.branch

          branch.exclusive_with?(other.branch)
        end
      end
    end
  end
end

Version data entries

7,149 entries across 7,110 versions & 50 rubygems

Version Path
cybrid_api_id_ruby-0.123.179 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.179 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.177 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.177 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.176 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.176 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.175 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.175 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.174 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.174 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.173 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.173 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
ory-client-1.16.3 vendor/bundle/ruby/3.1.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.172 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.172 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.171 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.171 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_id_ruby-0.123.170 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.170 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb
cybrid_api_organization_ruby-0.123.163 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/cop/variable_force/branchable.rb