Implement `file_append' task action
This commit is contained in:
1 parent
b1c7ff27b4
commit
387f37f3f5
6 files changed
+95
-3
No files matched your search
@@ -0,0 +1,23 @@
|
||||
module Producer
|
||||
module Core
|
||||
module Actions
|
||||
class FileAppend < Action
|
||||
def apply
|
||||
fs.file_write path, combined_content
|
||||
end
|
||||
|
||||
def path
|
||||
arguments[0]
|
||||
end
|
||||
|
||||
def content
|
||||
arguments[1]
|
||||
end
|
||||
|
||||
def combined_content
|
||||
fs.file_read(path) + content
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user