Module: Avm::EacLatexBase0::Sources::Build::CopyFiles

Defined in:
lib/avm/eac_latex_base0/sources/build/copy_files.rb

Instance Method Summary collapse

Instance Method Details

#copy_commons_filesObject



36
37
38
39
40
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 36

def copy_commons_files
  target_dir = source_temp_dir.join('commons')
  target_dir.mkpath
  ::Avm::EacLatexBase0::Sources::Build::Commons.instance.template.apply(self, target_dir)
end

#copy_project_dir(subpath) ⇒ Object



30
31
32
33
34
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 30

def copy_project_dir(subpath)
  Dir.entries(File.join(project.root, subpath)).each do |f|
    copy_project_obj(File.join(subpath, f))
  end
end

#copy_project_file(subpath) ⇒ Object



25
26
27
28
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 25

def copy_project_file(subpath)
  ::Avm::EacLatexBase0::Sources::Build::File.new(project, subpath)
                                            .build_to_dir(source_temp_dir)
end

#copy_project_filesObject



11
12
13
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 11

def copy_project_files
  copy_project_dir('.')
end

#copy_project_obj(subpath) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 15

def copy_project_obj(subpath)
  return if File.basename(subpath).start_with?('.')

  if File.directory?(File.join(project.root, subpath))
    copy_project_dir(subpath)
  else
    copy_project_file(subpath)
  end
end