Sha256: 47ac686294ae6e32d8ac92d5bf1ed13d396c3b31fc962514bdf31cc24bc39b08

Contents?: true

Size: 336 Bytes

Versions: 9

Compression:

Stored size: 336 Bytes

Contents

module IOStreams
  module File
    class Writer
      # Write to a file or stream
      def self.open(file_name_or_io, _=nil, &block)
        unless IOStreams.writer_stream?(file_name_or_io)
          ::File.open(file_name_or_io, 'wb', &block)
        else
          block.call(file_name_or_io)
        end
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iostreams-0.14.0 lib/io_streams/file/writer.rb
iostreams-0.13.0 lib/io_streams/file/writer.rb
iostreams-0.12.1 lib/io_streams/file/writer.rb
iostreams-0.12.0 lib/io_streams/file/writer.rb
iostreams-0.11.0 lib/io_streams/file/writer.rb
iostreams-0.10.1 lib/io_streams/file/writer.rb
iostreams-0.10.0 lib/io_streams/file/writer.rb
iostreams-0.9.1 lib/io_streams/file/writer.rb
iostreams-0.9.0 lib/io_streams/file/writer.rb