module Bcome::Initialization::Utils
Public Instance Methods
create_as_directory(path)
click to toggle source
# File lib/objects/initialization/utils.rb, line 6 def create_as_directory(path) ::FileUtils.mkdir_p(path) end
create_file_utils(method, paths)
click to toggle source
# File lib/objects/initialization/utils.rb, line 10 def create_file_utils(method, paths) paths.each do |path| if path.is_file_or_directory? @exists << path else send(method, path) @created << path end end end
initialize_empty_yaml_config(path)
click to toggle source
# File lib/objects/initialization/utils.rb, line 2 def initialize_empty_yaml_config(path) File.write(path, {}.to_yaml) end