Sha256: 93698505535049693c8fbf742eaf61c84c7b23bb605a751d6a27c50669936c74

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 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, _=nil, &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

1 entries across 1 versions & 1 rubygems

Version Path
iostreams-0.15.0 lib/io_streams/file/reader.rb