Class: Hetzner::Bootstrap::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/hetzner/bootstrap/template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param) ⇒ Template

Returns a new instance of Template.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/hetzner/bootstrap/template.rb', line 8

def initialize(param)
  # Available templating configurations can be found after
  # manually booting the rescue system, then reading the
  # hetzner templates at:
  #
  #   /root/.oldroot/nfs/install/configs/
  #
  # also run:   $ installimage -h
  #
  if param.is_a? Hetzner::Bootstrap::Template
    param
  elsif param.is_a? String
    @raw_template = param
  end
end

Instance Attribute Details

#raw_templateObject

Returns the value of attribute raw_template.



6
7
8
# File 'lib/hetzner/bootstrap/template.rb', line 6

def raw_template
  @raw_template
end

Instance Method Details

#to_sObject



24
25
26
# File 'lib/hetzner/bootstrap/template.rb', line 24

def to_s
  @raw_template
end