class Producer::Core::Actions::FileReplaceContent
Public Instance Methods
apply()
click to toggle source
# File lib/producer/core/actions/file_replace_content.rb, line 14 def apply fs.file_write @path, replaced_content end
name()
click to toggle source
# File lib/producer/core/actions/file_replace_content.rb, line 10 def name 'file_replace_content' end
replaced_content()
click to toggle source
# File lib/producer/core/actions/file_replace_content.rb, line 18 def replaced_content fs.file_read(@path).gsub @pattern, @replacement end
setup()
click to toggle source
# File lib/producer/core/actions/file_replace_content.rb, line 5 def setup check_arguments_size! 3 @path, @pattern, @replacement = arguments end