Class: Producer::Core::Actions::FileWriter
Constant Summary
Producer::Core::Action::INSPECT_ARGUMENTS_SUM_LEN
Instance Attribute Summary
#arguments, #env, #options
Instance Method Summary
collapse
#initialize, #to_s
Instance Method Details
#apply ⇒ Object
15
16
17
18
|
# File 'lib/producer/core/actions/file_writer.rb', line 15
def apply
fs.file_write @path, @content
fs.setstat @path, options unless options.empty?
end
|
#name ⇒ Object
11
12
13
|
# File 'lib/producer/core/actions/file_writer.rb', line 11
def name
'file_write'
end
|
#setup ⇒ Object
5
6
7
8
9
|
# File 'lib/producer/core/actions/file_writer.rb', line 5
def setup
check_arguments_size! 2
@path, @content = arguments
convert_options mode: :permissions, user: :owner
end
|