Class: Comfy::Templater

Inherits:
Object
  • Object
show all
Defined in:
lib/comfy/templater.rb

Overview

Class used for preparing and filling file templates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Templater

Creates an instance of Templater.

Parameters:

  • data (Hash)

    prepared data with distro, provisioners, files, password and identifier info.



13
14
15
# File 'lib/comfy/templater.rb', line 13

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/comfy/templater.rb', line 8

def data
  @data
end

Instance Method Details

#prepare_filesObject

Prepares *.json and *.cfg files from templates for selected distribution



18
19
20
21
# File 'lib/comfy/templater.rb', line 18

def prepare_files
  prepare_file('cfg')
  prepare_file('packer', true)
end