Class: PEBuild::Release::Instance Private

Inherits:
Object
  • Object
show all
Defined in:
lib/pe_build/release/instance.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.

Define a Puppet Enterprise release

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&blk) ⇒ Instance

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.

Returns a new instance of Instance.



8
9
10
11
12
13
14
15
# File 'lib/pe_build/release/instance.rb', line 8

def initialize(&blk)

  @supported = Hash.new { |hash, key| hash[key] = Set.new }

  @answer_files = {}

  instance_eval(&blk) if blk
end

Instance Attribute Details

#versionObject (readonly)

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.



6
7
8
# File 'lib/pe_build/release/instance.rb', line 6

def version
  @version
end

Instance Method Details

#answer_file(role) ⇒ 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.

Return the answer file template for the given role and release of PE

Parameters:

  • role (Symbol)

    The role for the template

Returns:



35
36
37
# File 'lib/pe_build/release/instance.rb', line 35

def answer_file(role)
  @answer_files[role]
end

#supports?(distro, dist_release) ⇒ true, false

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.

Determine if Puppet Enterprise supports the specific release

Parameters:

  • distro (String)

    The distribution to check

  • dist_release (String)

    The version release to check

Returns:

  • (true, false)


23
24
25
26
27
28
# File 'lib/pe_build/release/instance.rb', line 23

def supports?(distro, dist_release)
  distro       = distro.to_sym     unless distro.is_a? Symbol
  dist_release = dist_release.to_s unless dist_release.is_a? String

  @supported[distro].include? dist_release
end