Method: Puppet::Pops::Types::TypeCalculator#instance?

Defined in:
lib/puppet/pops/types/type_calculator.rb

#instance?(t, o) ⇒ Boolean

Answers ‘is o an instance of type t’

Returns:

  • (Boolean)


303
304
305
306
307
308
# File 'lib/puppet/pops/types/type_calculator.rb', line 303

def instance?(t, o)
  if t.is_a?(Module)
    t = type(t)
  end
  t.is_a?(PAnyType) ? t.instance?(o) : false
end