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



33
34
35
36
37
38
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 33

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

#copy_project_dir(subpath) ⇒ Object



27
28
29
30
31
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 27

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



22
23
24
25
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 22

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

#copy_project_filesObject



8
9
10
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 8

def copy_project_files
  copy_project_dir('.')
end

#copy_project_obj(subpath) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/avm/eac_latex_base0/sources/build/copy_files.rb', line 12

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