def conditional_assignment(variable, value, bool = true)
      variable.reference_amount += 1

      if current_scope.has_definition?(variable.type, variable.name) == bool
        variable.value = value

        current_scope.add_definition(variable)

        buffer_assignment_value(variable.value)
      end
    end
def conditional_assignment(variable, value, bool = true)
      variable.reference_amount += 1

      if current_scope.has_definition?(variable.type, variable.name) == bool
        variable.value = value

        current_scope.add_definition(variable)

        buffer_assignment_value(variable.value)
      end
    end
Performs a conditional assignment.

 @param [RubyLint::Definition::RubyObject] variable
 @param [RubyLint::Definition::RubyValue] value
 @param [TrueClass|FalseClass] bool When set to `true` existing variables
  will be overwritten.