Sha256: 2f955df780735415ce073925f542c1a50ddf545daf60254ace9a49675e97b039

Contents?: true

Size: 414 Bytes

Versions: 7

Compression:

Stored size: 414 Bytes

Contents

module IOStreams
  module File
    class Reader
      # Read from a named file
      # TODO: Add support for mode (text / binary)
      # TODO: Add encoding support: external_encoding, internal_encoding
      def self.open(file_name, **args, &block)
        raise(ArgumentError, 'File name must be a string') unless file_name.is_a?(String)

        ::File.open(file_name, 'rb', &block)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iostreams-0.17.3 lib/io_streams/file/reader.rb
iostreams-0.17.2 lib/io_streams/file/reader.rb
iostreams-0.17.1 lib/io_streams/file/reader.rb
iostreams-0.17.0 lib/io_streams/file/reader.rb
iostreams-0.16.2 lib/io_streams/file/reader.rb
iostreams-0.16.1 lib/io_streams/file/reader.rb
iostreams-0.16.0 lib/io_streams/file/reader.rb