# File lib/puppet/type.rb, line 1810 1810: def parent 1811: return nil unless catalog 1812: 1813: unless defined?(@parent) 1814: if parents = catalog.adjacent(self, :direction => :in) 1815: # We should never have more than one parent, so let's just ignore 1816: # it if we happen to. 1817: @parent = parents.shift 1818: else 1819: @parent = nil 1820: end 1821: end 1822: @parent 1823: end