class Puppet::Pops::Types::PIteratorType

@api public

Constants

DEFAULT

Public Class Methods

register_ptype(loader, ir) click to toggle source
     # File lib/puppet/pops/types/types.rb
1461 def self.register_ptype(loader, ir)
1462   create_ptype(loader, ir, 'AnyType',
1463     'type' => {
1464       KEY_TYPE => POptionalType.new(PTypeType::DEFAULT),
1465       KEY_VALUE => nil
1466     }
1467   )
1468 end

Public Instance Methods

element_type() click to toggle source
     # File lib/puppet/pops/types/types.rb
1470 def element_type
1471   @type
1472 end
instance?(o, guard = nil) click to toggle source
     # File lib/puppet/pops/types/types.rb
1474 def instance?(o, guard = nil)
1475   o.is_a?(Iterable) && (@type.nil? || @type.assignable?(o.element_type, guard))
1476 end
iterable?(guard = nil) click to toggle source
     # File lib/puppet/pops/types/types.rb
1478 def iterable?(guard = nil)
1479   true
1480 end
iterable_type(guard = nil) click to toggle source
     # File lib/puppet/pops/types/types.rb
1482 def iterable_type(guard = nil)
1483   @type.nil? ? PIterableType::DEFAULT : PIterableType.new(@type)
1484 end

Protected Instance Methods

_assignable?(o, guard) click to toggle source

@api private

     # File lib/puppet/pops/types/types.rb
1491 def _assignable?(o, guard)
1492   o.is_a?(PIteratorType) && (@type.nil? || @type.assignable?(o.element_type, guard))
1493 end