Class: Puppet::Pops::Types::PUndefType
- Inherits:
-
PAnyType
- Object
- TypedModelObject
- PAnyType
- Puppet::Pops::Types::PUndefType
- Defined in:
- lib/puppet/pops/types/types.rb
Constant Summary collapse
- DEFAULT =
PUndefType.new
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from PAnyType
#==, #accept, #assignable?, #callable?, #callable_with?, #check_self_recursion, create, #create, #eql?, #generalize, #hash, #iterable?, #iterable_type, #kind_of_callable?, #loader, #name, new_function, #new_function, #normalize, #really_instance?, #resolve, #roundtrip_with_string?, simple_name, #simple_name, #to_alias_expanded_s, #to_s
Methods inherited from TypedModelObject
_pcore_type, create_ptype, register_ptypes
Methods included from Visitable
Methods included from PuppetObject
#_pcore_all_contents, #_pcore_contents, #_pcore_init_hash, #_pcore_type, #to_s
Class Method Details
.register_ptype(loader, ir) ⇒ Object
604 605 606 |
# File 'lib/puppet/pops/types/types.rb', line 604 def self.register_ptype(loader, ir) create_ptype(loader, ir, 'AnyType') end |
Instance Method Details
#callable_args?(callable_t, guard) ⇒ 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.
613 614 615 616 |
# File 'lib/puppet/pops/types/types.rb', line 613 def callable_args?(callable_t, guard) # if callable_t is Optional (or indeed PUndefType), this means that 'missing callable' is accepted callable_t.assignable?(DEFAULT, guard) end |
#instance?(o, guard = nil) ⇒ Boolean
608 609 610 |
# File 'lib/puppet/pops/types/types.rb', line 608 def instance?(o, guard = nil) o.nil? || :undef == o end |