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.



3310
3311
3312
# File 'lib/puppet/pops/types/types.rb', line 3310

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)


3320
3321
3322
# File 'lib/puppet/pops/types/types.rb', line 3320

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.



3314
3315
3316
3317
3318
# File 'lib/puppet/pops/types/types.rb', line 3314

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