Method: Puppet::Pops::Types::PRuntimeType#from_puppet_name

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

#from_puppet_name(puppet_name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



80
81
82
83
84
85
86
87
# File 'lib/puppet/pops/types/p_runtime_type.rb', line 80

def from_puppet_name(puppet_name)
  if @name_or_pattern.is_a?(Array)
    substituted = puppet_name.sub(*@name_or_pattern)
    substituted == puppet_name ? nil : PRuntimeType.new(@runtime, substituted)
  else
    nil
  end
end