diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-10-04 00:15:04 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-10-04 00:15:04 +0000 |
commit | 55d7bbdcbefd550cee46a628da2292be540401ad (patch) | |
tree | d46528e0b6ad06e930dfde3a09adcdfa58a484c4 /lib/puppet/transportable.rb | |
parent | e563189acd0755a8d32ab956e758405fd3a6f40a (diff) | |
download | puppet-55d7bbdcbefd550cee46a628da2292be540401ad.tar.gz puppet-55d7bbdcbefd550cee46a628da2292be540401ad.tar.xz puppet-55d7bbdcbefd550cee46a628da2292be540401ad.zip |
adding tag support to scopes and the transportable class
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@715 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/transportable.rb')
-rw-r--r-- | lib/puppet/transportable.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb index f50060d67..1f44f560a 100644 --- a/lib/puppet/transportable.rb +++ b/lib/puppet/transportable.rb @@ -9,6 +9,8 @@ module Puppet class TransObject < Hash attr_accessor :type, :name, :file, :line + attr_writer :tags + def initialize(name,type) self[:name] = name @type = type @@ -20,6 +22,10 @@ module Puppet return [self.type,self[:name]].join('--') end + def tags + return @tags + [self.type, self.name] + end + def to_s return "%s(%s) => %s" % [@type,self[:name],super] end |