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 1462 def self.register_ptype(loader, ir) 1463 create_ptype(loader, ir, 'AnyType', 1464 'type' => { 1465 KEY_TYPE => POptionalType.new(PTypeType::DEFAULT), 1466 KEY_VALUE => nil 1467 } 1468 ) 1469 end
Public Instance Methods
element_type()
click to toggle source
# File lib/puppet/pops/types/types.rb 1471 def element_type 1472 @type 1473 end
instance?(o, guard = nil)
click to toggle source
# File lib/puppet/pops/types/types.rb 1475 def instance?(o, guard = nil) 1476 o.is_a?(Iterable) && (@type.nil? || @type.assignable?(o.element_type, guard)) 1477 end
iterable?(guard = nil)
click to toggle source
# File lib/puppet/pops/types/types.rb 1479 def iterable?(guard = nil) 1480 true 1481 end
iterable_type(guard = nil)
click to toggle source
# File lib/puppet/pops/types/types.rb 1483 def iterable_type(guard = nil) 1484 @type.nil? ? PIterableType::DEFAULT : PIterableType.new(@type) 1485 end
Protected Instance Methods
_assignable?(o, guard)
click to toggle source
@api private
# File lib/puppet/pops/types/types.rb 1492 def _assignable?(o, guard) 1493 o.is_a?(PIteratorType) && (@type.nil? || @type.assignable?(o.element_type, guard)) 1494 end