Class: Puppet::Pops::Types::PTypeAliasType::AssertOtherTypeAcceptor Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/pops/types/types.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Acceptor used when checking for self recursion and that a type contains something other than aliases or type references

Instance Method Summary collapse

Constructor Details

#initializeAssertOtherTypeAcceptor

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of AssertOtherTypeAcceptor.



3427
3428
3429
# File 'lib/puppet/pops/types/types.rb', line 3427

def initialize
  @other_type_detected = false
end

Instance Method Details

#other_type_detected?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


3437
3438
3439
# File 'lib/puppet/pops/types/types.rb', line 3437

def other_type_detected?
  @other_type_detected
end

#visit(type, _) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3431
3432
3433
3434
3435
# File 'lib/puppet/pops/types/types.rb', line 3431

def visit(type, _)
  unless type.is_a?(PTypeAliasType) || type.is_a?(PVariantType)
    @other_type_detected = true
  end
end