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.



3430
3431
3432
# File 'lib/puppet/pops/types/types.rb', line 3430

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)


3440
3441
3442
# File 'lib/puppet/pops/types/types.rb', line 3440

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.



3434
3435
3436
3437
3438
# File 'lib/puppet/pops/types/types.rb', line 3434

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