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



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

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

.from_yaml(yaml) ⇒ Object



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

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

Instance Method Details

#join(*args) ⇒ Object



24
25
26
# File 'lib/puppet/util/tag_set.rb', line 24

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

#to_data_hashObject

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



20
21
22
# File 'lib/puppet/util/tag_set.rb', line 20

def to_data_hash
  to_a
end

#to_yamlObject



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

def to_yaml
  @hash.keys.to_yaml
end