Implement `file_write' action
This commit is contained in:
19
lib/producer/core/actions/file_writer.rb
Normal file
19
lib/producer/core/actions/file_writer.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
module Producer
|
||||
module Core
|
||||
module Actions
|
||||
class FileWriter < Action
|
||||
def apply
|
||||
env.remote.fs.file_write path, content
|
||||
end
|
||||
|
||||
def path
|
||||
arguments[0]
|
||||
end
|
||||
|
||||
def content
|
||||
arguments[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user