Sha256: dfedcd70a29d09d60fa2e1aacf6299f1ecb8e5f554b012ba1e272ab65dec1179
Contents?: true
Size: 616 Bytes
Versions: 26
Compression:
Stored size: 616 Bytes
Contents
# frozen_string_literal: true require 'fileutils' require 'dato/dump/format' module Dato module Dump module Operation class CreateDataFile attr_reader :context, :path, :format, :value def initialize(context, path, format, value) @context = context @path = path @format = format @value = value end def perform FileUtils.mkdir_p(File.dirname(path)) File.open(File.join(context.path, path), 'w') do |file| file.write Format.dump(format, value) end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems