Class: Aruba::Platforms::ArubaFileCreator
- Inherits:
-
Object
- Object
- Aruba::Platforms::ArubaFileCreator
- Defined in:
- lib/aruba/platforms/aruba_file_creator.rb
Overview
Normal File Creator This class is not meant to be used directly by users.
Instance Method Summary collapse
Instance Method Details
#call(path, content, check_presence = false) ⇒ Object
Write File
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/aruba/platforms/aruba_file_creator.rb', line 20 def call(path, content, check_presence = false) if check_presence && !Aruba.platform.file?(path) raise "Expected #{path} to be present" end Aruba.platform.mkdir(File.dirname(path)) File.write(path, content) self end |