Sha256: 3f7042164c7c65582ec575318a8eb04f758fa89c17424e624c30fca9e526f8c9

Contents?: true

Size: 278 Bytes

Versions: 15

Compression:

Stored size: 278 Bytes

Contents

# frozen_string_literal: true

module CrudeMutant
  class FileWriter
    def self.write(file_path, contents_as_array)
      File.open(file_path, 'w') do |f|
        contents_as_array.each do |line|
          f.write(line)
        end

        f.flush
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
crude-mutant-0.5.5 lib/crude_mutant/file_writer.rb
crude-mutant-0.5.4 lib/crude_mutant/file_writer.rb
crude-mutant-0.5.3 lib/crude_mutant/file_writer.rb
crude-mutant-0.5.2 lib/crude_mutant/file_writer.rb
crude-mutant-0.5.1 lib/crude_mutant/file_writer.rb
crude-mutant-0.5.0 lib/crude_mutant/file_writer.rb
crude-mutant-0.4.0 lib/crude_mutant/file_writer.rb
crude-mutant-0.3.4 lib/crude_mutant/file_writer.rb
crude-mutant-0.3.3 lib/crude_mutant/file_writer.rb
crude-mutant-0.3.2 lib/crude_mutant/file_writer.rb
crude-mutant-0.3.1 lib/crude_mutant/file_writer.rb
crude-mutant-0.3.0 lib/crude_mutant/file_writer.rb
crude-mutant-0.2.3 lib/crude_mutant/file_writer.rb
crude-mutant-0.2.2 lib/crude_mutant/file_writer.rb
crude-mutant-0.2.1 lib/crude_mutant/file_writer.rb