# class Puppet::ModuleTool::Applications::Generator::ParsedFileNode

### Public Class Methods

matches?(path) click to toggle source

    # File lib/puppet/module_tool/applications/generator.rb, line 115
    def self.matches?(path)
      path.file? && path.extname == '.erb'
    end

### Public Instance Methods

contents() click to toggle source

    # File lib/puppet/module_tool/applications/generator.rb, line 122
    def contents
      template = ERB.new(read)
      template.result(@generator.send(:get_binding))
    end

install!() click to toggle source

    # File lib/puppet/module_tool/applications/generator.rb, line 126
    def install!
      target.open('w') { |f| f.write contents }
    end

target() click to toggle source
Calls superclass method Puppet::ModuleTool::Applications::Generator::Node#target

    # File lib/puppet/module_tool/applications/generator.rb, line 118
    def target
      path = super
      path.parent + path.basename('.erb')
    end