Node module = moduleFinder.findModule(root, new String[] { "Puppet" });
for(Node n : module.childNodes()) {
if(n.getNodeType() == NodeType.NEWLINENODE)
n = ((NewlineNode) n).getNextNode();
if(n.getNodeType() == NodeType.CLASSNODE) {
ClassNode classNode = (ClassNode) n;
// could check if this is the class 'Type' but somewhat
// meaningless
// as this code is only called for the Type.rb file anyway.
// classNode.getCPath();
for(Node bn : classNode.getBody().childNodes()) {
if(bn.getNodeType() == NodeType.NEWLINENODE)
bn = ((NewlineNode) bn).getNextNode();
if(bn.getNodeType() == NodeType.FCALLNODE) {
FCallNode callNode = (FCallNode) bn;
if("newmetaparam".equals(callNode.getName())) {