Class: Puppet::Util::TagSet Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



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

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

.from_yaml(yaml) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



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

def self.from_yaml(yaml)
  self.new(Puppet::Util::Yaml.safe_load(yaml, [Symbol]))
end

Instance Method Details

#join(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



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

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

#to_data_hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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

API:

  • private



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

def to_data_hash
  to_a
end

#to_yamlObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



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

def to_yaml
  @hash.keys.to_yaml
end