Sha256: 758d5095eb5516abbf8394a457363b7c4c8a2035823501198b74850522c089f5
Contents?: true
Size: 615 Bytes
Versions: 49
Compression:
Stored size: 615 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
49 entries across 49 versions & 1 rubygems