# File lib/puppet/type.rb, line 1988
1988:     def parent
1989:         return nil unless catalog
1990: 
1991:         unless defined?(@parent)
1992:             if parents = catalog.adjacent(self, :direction => :in)
1993:                 # We should never have more than one parent, so let's just ignore
1994:                 # it if we happen to.
1995:                 @parent = parents.shift
1996:             else
1997:                 @parent = nil
1998:             end
1999:         end
2000:         @parent
2001:     end