Sha256: aea629824e5d6c315d2699a741a859147f08e20f10cfb02edaafac3baaf72279
Contents?: true
Size: 583 Bytes
Versions: 19
Compression:
Stored size: 583 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
19 entries across 19 versions & 2 rubygems