Class: Puppet::Util::TagSet

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Network::FormatSupport

included, #mime, #render, #support_format?, #to_json, #to_msgpack, #to_pson

Class Method Details

.from_data_hash(data) ⇒ Object



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

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

.from_yaml(yaml) ⇒ Object



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

def self.from_yaml(yaml)
  new(Puppet::Util::Yaml.safe_load(yaml, [Symbol]))
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_data_hashObject

TODO: A method named #to_data_hash should not return an array



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

def to_data_hash
  to_a
end

#to_yamlObject



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

def to_yaml
  @hash.keys.to_yaml
end