Class: Puppet::Util::TagSet

Inherits:
Set
  • Object
show all
Defined in:
lib/puppet/util/tag_set.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_pson(data) ⇒ Object



12
13
14
# File 'lib/puppet/util/tag_set.rb', line 12

def self.from_pson(data)
  self.new(data)
end

.from_yaml(yaml) ⇒ Object



4
5
6
# File 'lib/puppet/util/tag_set.rb', line 4

def self.from_yaml(yaml)
  self.new(YAML.load(yaml))
end

Instance Method Details

#join(*args) ⇒ Object



26
27
28
# File 'lib/puppet/util/tag_set.rb', line 26

def join(*args)
  to_a.join(*args)
end

#to_pson(*args) ⇒ Object



16
17
18
# File 'lib/puppet/util/tag_set.rb', line 16

def to_pson(*args)
  to_a.to_pson
end

#to_yamlObject



8
9
10
# File 'lib/puppet/util/tag_set.rb', line 8

def to_yaml
  @hash.keys.to_yaml
end

#to_zaml(z) ⇒ Object

this makes puppet serialize it as an array for backwards compatibility



22
23
24
# File 'lib/puppet/util/tag_set.rb', line 22

def to_zaml(z)
  to_a.to_zaml(z)
end