Method: Puppet::Pops::Types::TypeCalculator#equals
- Defined in:
- lib/puppet/pops/types/type_calculator.rb
#equals(left, right) ⇒ Object
Answers if the two given types describe the same type
200 201 202 203 204 205 206 207 |
# File 'lib/puppet/pops/types/type_calculator.rb', line 200 def equals(left, right) return false unless left.is_a?(PAnyType) && right.is_a?(PAnyType) # Types compare per class only - an extra test must be made if the are mutually assignable # to find all types that represent the same type of instance # left == right || (assignable?(right, left) && assignable?(left, right)) end |