diff options
| author | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 22:04:09 +0000 |
|---|---|---|
| committer | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 22:04:09 +0000 |
| commit | 115ec095357171381e2af3aa5ebbd61164b40064 (patch) | |
| tree | 2060872eefd6fdbae72a20cb95998a1d364c8a80 /lib/puppet/parser | |
| parent | f851ca64cf3861ffa63cf2698fd4719361803f82 (diff) | |
| download | puppet-115ec095357171381e2af3aa5ebbd61164b40064.tar.gz puppet-115ec095357171381e2af3aa5ebbd61164b40064.tar.xz puppet-115ec095357171381e2af3aa5ebbd61164b40064.zip | |
Re-add support for tags and file/lines
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1953 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/resource.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 05e0af4c1..64c4e1bb9 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -231,13 +231,13 @@ class Puppet::Parser::Resource end end - #def tags - # unless defined? @tags - # @tags = scope.tags - # @tags << self.type - # end - # @tags - #end + def tags + unless defined? @tags + @tags = scope.tags + @tags << self.type + end + @tags + end def to_hash @params.inject({}) do |hash, ary| @@ -250,9 +250,7 @@ class Puppet::Parser::Resource # Turn our parser resource into a Rails resource. def to_rails(host) args = {} - #FIXME: support files/lines, etc. - #%w{type title tags file line exported}.each do |param| - %w{type title exported}.each do |param| + %w{type title tags file line exported}.each do |param| if value = self.send(param) args[param] = value end @@ -317,7 +315,7 @@ class Puppet::Parser::Resource obj.file = self.file obj.line = self.line - #obj.tags = self.tags + obj.tags = self.tags return obj end |
