Class: Puppet::Pops::Types::PDataType

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

Overview

A flexible data type, being assignable to its subtypes as well as PArrayType and PHashType with element type assignable to PDataType.

Constant Summary collapse

DEFAULT =
PDataType.new

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PAnyType

#==, #accept, #assignable?, #callable?, #callable_args?, #check_self_recursion, #generalize, #hash, #iterable?, #iterable_type, #kind_of_callable?, #name, #new_function, new_function, #normalize, #really_instance?, #resolve, #simple_name, simple_name, #to_alias_expanded_s, #to_s

Methods inherited from TypedModelObject

_ptype, create_ptype, register_ptypes

Methods included from Visitable

#accept

Methods included from PuppetObject

#_ptype

Class Method Details

.register_ptype(loader, ir) ⇒ Object



630
631
632
# File 'lib/puppet/pops/types/types.rb', line 630

def self.register_ptype(loader, ir)
  create_ptype(loader, ir, 'AnyType')
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


634
635
636
# File 'lib/puppet/pops/types/types.rb', line 634

def eql?(o)
  self.class == o.class || o == PVariantType::DATA
end

#instance?(o, guard = nil) ⇒ Boolean

Returns:

  • (Boolean)


638
639
640
# File 'lib/puppet/pops/types/types.rb', line 638

def instance?(o, guard = nil)
  PVariantType::DATA.instance?(o, guard)
end