Class: ImageBuilder::Provisioners::File

Inherits:
Base
  • Object
show all
Defined in:
lib/image_builder/provisioners/file.rb

Overview

Generic class doc comment

Constant Summary

Constants included from ImageBuilder

VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFile

Returns a new instance of File.



12
13
14
# File 'lib/image_builder/provisioners/file.rb', line 12

def initialize
  @type = 'file'
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



8
9
10
# File 'lib/image_builder/provisioners/file.rb', line 8

def destination
  @destination
end

#sourceObject

Returns the value of attribute source.



7
8
9
# File 'lib/image_builder/provisioners/file.rb', line 7

def source
  @source
end

#typeObject (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/image_builder/provisioners/file.rb', line 10

def type
  @type
end

Instance Method Details

#packer_hashObject



16
17
18
19
20
21
22
23
# File 'lib/image_builder/provisioners/file.rb', line 16

def packer_hash
  hash = { type: @type }

  attr_to_hash(hash, :source, true)
  attr_to_hash(hash, :destination, true)

  hash
end