diff options
| author | Luke Kanies <luke@madstop.com> | 2007-08-22 18:03:55 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-08-22 18:03:55 -0500 |
| commit | 0682d7e473cfd8f2fe6bee9eae0868b846fd0d50 (patch) | |
| tree | fb66cc4c81e95ee42905410310095b9a8ae23ecc /lib/puppet/parser/parser_support.rb | |
| parent | ec50484518425ec8ac36f89b087beb27d5a3d2c8 (diff) | |
| parent | 8b3361afae35cfb65754d7bd9aff5b820ed714f0 (diff) | |
| download | puppet-0682d7e473cfd8f2fe6bee9eae0868b846fd0d50.tar.gz puppet-0682d7e473cfd8f2fe6bee9eae0868b846fd0d50.tar.xz puppet-0682d7e473cfd8f2fe6bee9eae0868b846fd0d50.zip | |
Merge branch 'multi_env'
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
| -rw-r--r-- | lib/puppet/parser/parser_support.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb index 728f75a69..967508e56 100644 --- a/lib/puppet/parser/parser_support.rb +++ b/lib/puppet/parser/parser_support.rb @@ -1,3 +1,5 @@ +# I pulled this into a separate file, because I got +# tired of rebuilding the parser.rb file all the time. class Puppet::Parser::Parser require 'puppet/parser/functions' @@ -442,6 +444,17 @@ class Puppet::Parser::Parser def string=(string) @lexer.string = string end + + # Add a new file to be checked when we're checking to see if we should be + # reparsed. + def watch_file(*files) + files.each do |file| + unless file.is_a? Puppet::Util::LoadedFile + file = Puppet::Util::LoadedFile.new(file) + end + @files << file + end + end end # $Id$ |
