Class: Avm::Git::Commit::Deploy::Appended::FileContent
- Defined in:
- lib/avm/git/commit/deploy/appended/file_content.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#target_path ⇒ Object
readonly
Returns the value of attribute target_path.
Instance Method Summary collapse
- #copy_to_build_dir ⇒ Object
-
#initialize(deploy, target_path, content) ⇒ FileContent
constructor
A new instance of FileContent.
Constructor Details
#initialize(deploy, target_path, content) ⇒ FileContent
Returns a new instance of FileContent.
14 15 16 17 18 |
# File 'lib/avm/git/commit/deploy/appended/file_content.rb', line 14 def initialize(deploy, target_path, content) super(deploy) @target_path = target_path @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
12 13 14 |
# File 'lib/avm/git/commit/deploy/appended/file_content.rb', line 12 def content @content end |
#target_path ⇒ Object (readonly)
Returns the value of attribute target_path.
12 13 14 |
# File 'lib/avm/git/commit/deploy/appended/file_content.rb', line 12 def target_path @target_path end |
Instance Method Details
#copy_to_build_dir ⇒ Object
20 21 22 |
# File 'lib/avm/git/commit/deploy/appended/file_content.rb', line 20 def copy_to_build_dir deploy.build_dir.to_pathname.join(target_path).write(content) end |