Class: Avm::Git::Commit::Deploy::Appended::Directory

Inherits:
Base
  • Object
show all
Defined in:
lib/avm/git/commit/deploy/appended/directory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deploy, source_path) ⇒ Directory

Returns a new instance of Directory.



14
15
16
17
# File 'lib/avm/git/commit/deploy/appended/directory.rb', line 14

def initialize(deploy, source_path)
  super(deploy)
  @source_path = source_path
end

Instance Attribute Details

#source_pathObject (readonly)

Returns the value of attribute source_path.



12
13
14
# File 'lib/avm/git/commit/deploy/appended/directory.rb', line 12

def source_path
  @source_path
end

Instance Method Details

#copy_to_build_dirObject



19
20
21
22
23
24
25
26
# File 'lib/avm/git/commit/deploy/appended/directory.rb', line 19

def copy_to_build_dir
  raise 'Variables source not set' if deploy.variables_source.blank?

  ::EacRubyUtils::Templates::Directory.new(source_path).apply(
    deploy.variables_source,
    deploy.build_dir
  )
end