Sha256: 87aac25ee572c34746ab0c72d2671104574a8fcdf1a6637896335fb00a2b7d68

Contents?: true

Size: 546 Bytes

Versions: 27

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true
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
          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

27 entries across 27 versions & 1 rubygems

Version Path
dato-0.2.7 lib/dato/dump/operation/create_data_file.rb
dato-0.2.6 lib/dato/dump/operation/create_data_file.rb
dato-0.2.4 lib/dato/dump/operation/create_data_file.rb
dato-0.1.31 lib/dato/dump/operation/create_data_file.rb
dato-0.1.30 lib/dato/dump/operation/create_data_file.rb
dato-0.1.29 lib/dato/dump/operation/create_data_file.rb
dato-0.1.28 lib/dato/dump/operation/create_data_file.rb
dato-0.1.27 lib/dato/dump/operation/create_data_file.rb
dato-0.1.26 lib/dato/dump/operation/create_data_file.rb
dato-0.1.25 lib/dato/dump/operation/create_data_file.rb
dato-0.1.24 lib/dato/dump/operation/create_data_file.rb
dato-0.1.23 lib/dato/dump/operation/create_data_file.rb
dato-0.1.22 lib/dato/dump/operation/create_data_file.rb
dato-0.1.21 lib/dato/dump/operation/create_data_file.rb
dato-0.1.20 lib/dato/dump/operation/create_data_file.rb
dato-0.1.19 lib/dato/dump/operation/create_data_file.rb
dato-0.1.18 lib/dato/dump/operation/create_data_file.rb
dato-0.1.17 lib/dato/dump/operation/create_data_file.rb
dato-0.1.16 lib/dato/dump/operation/create_data_file.rb
dato-0.1.15 lib/dato/dump/operation/create_data_file.rb