lib/puppet/pops/types/p_type_set_type.rb
# Returns the name by which the given type is referenced from within this type set
# @param t [PAnyType]
# @return [String] the name by which the type is referenced within this type set
#
# @api private
Returns the name by which the given type is referenced from within this type set
Returns the name by which the given type is referenced from within this type set
def name_for(t, default_name)
    key = @types.key(t)
    if key.nil?
      qname = t.name
      if @references.empty?
        default_name
      else
        @references.each_pair do |ref_key, ref|
          ref_name = ref.type_set.name_for(t, nil)
          return "#{ref_key}::#{ref_name}" unless ref_name.nil?
        end
        default_name
      end
    else
      key
    end
  end
def name_for ( t , default_name ) key = @types . key ( t ) if key . nil? qname = t . name if @references . empty? default_name else @references . each_pair do | ref_key , ref | ref_name = ref . type_set . name_for ( t , nil ) return "#{ref_key}::#{ref_name}" unless ref_name . nil? end default_name end else key end end
Returns the name by which the given type is referenced from within this type set
Returns the name by which the given type is referenced from within this type set
the name by which the type is referenced within this type set
the name by which the type is referenced within this type set
String
t
default_name
None
api
None