Class: Puppet::Pops::Types::PRuntimeType
Constant Summary
collapse
- DEFAULT =
PRuntimeType.new(nil)
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from PAnyType
#assignable?, #callable?, #callable_args?, #enumerable?, #generalize, #kind_of_callable?, #simple_name, #to_s
Methods included from Visitable
#accept
Constructor Details
#initialize(runtime, runtime_type_name = nil) ⇒ PRuntimeType
Returns a new instance of PRuntimeType.
1386
1387
1388
1389
|
# File 'lib/puppet/pops/types/types.rb', line 1386
def initialize(runtime, runtime_type_name = nil)
@runtime = runtime
@runtime_type_name = runtime_type_name
end
|
Instance Attribute Details
1384
1385
1386
|
# File 'lib/puppet/pops/types/types.rb', line 1384
def runtime
@runtime
end
|
#runtime_type_name ⇒ Object
1384
1385
1386
|
# File 'lib/puppet/pops/types/types.rb', line 1384
def runtime_type_name
@runtime_type_name
end
|
Instance Method Details
1395
1396
1397
|
# File 'lib/puppet/pops/types/types.rb', line 1395
def ==(o)
self.class == o.class && @runtime == o.runtime && @runtime_type_name == o.runtime_type_name
end
|
1391
1392
1393
|
# File 'lib/puppet/pops/types/types.rb', line 1391
def hash
@runtime.hash * 31 + @runtime_type_name.hash
end
|
#instance?(o) ⇒ Boolean
1399
1400
1401
|
# File 'lib/puppet/pops/types/types.rb', line 1399
def instance?(o)
assignable?(TypeCalculator.infer(o))
end
|