Method: Puppet::Pops::Types::TypeParser#parse
- Defined in:
- lib/puppet/pops/types/type_parser.rb
#parse(string, context = nil) ⇒ PAnyType
Produces a *puppet type* based on the given string.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/puppet/pops/types/type_parser.rb', line 37 def parse(string, context = nil) # quick "peephole" optimization of common data types t = self.class.opt_type_map[string] if t return t end model = @parser.parse_string(string) interpret(model.model.body, context) end |