Class: Texas::Build::Task::CopyContentsToBuildPath
- Inherits:
-
Base
- Object
- Base
- Texas::Build::Task::CopyContentsToBuildPath
show all
- Defined in:
- lib/texas/build/task/copy_contents_to_build_path.rb
Instance Attribute Summary
Attributes inherited from Base
#build
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#build_path ⇒ Object
10
11
12
|
# File 'lib/texas/build/task/copy_contents_to_build_path.rb', line 10
def build_path
build.__path__
end
|
#contents_dir ⇒ Object
14
15
16
|
# File 'lib/texas/build/task/copy_contents_to_build_path.rb', line 14
def contents_dir
build.contents_dir
end
|
#copy_to_build_path ⇒ Object
23
24
25
26
|
# File 'lib/texas/build/task/copy_contents_to_build_path.rb', line 23
def copy_to_build_path
FileUtils.rm_r build_path
FileUtils.cp_r contents_dir, build_path
end
|
#ensure_build_path_exists ⇒ Object
18
19
20
21
|
# File 'lib/texas/build/task/copy_contents_to_build_path.rb', line 18
def ensure_build_path_exists
FileUtils.mkdir_p build_path
rescue
end
|
#run ⇒ Object
5
6
7
8
|
# File 'lib/texas/build/task/copy_contents_to_build_path.rb', line 5
def run
ensure_build_path_exists
copy_to_build_path
end
|