Sha256: 8d3d76ad3fc4f110d4a512f5045c1993782a6fcfc5f7bc237c14a93e69bace67

Contents?: true

Size: 337 Bytes

Versions: 9

Compression:

Stored size: 337 Bytes

Contents

module IOStreams
  module File
    class Reader
      # Read from a file or stream
      def self.open(file_name_or_io, _=nil, &block)
        unless IOStreams.reader_stream?(file_name_or_io)
          ::File.open(file_name_or_io, 'rb', &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/reader.rb
iostreams-0.13.0 lib/io_streams/file/reader.rb
iostreams-0.12.1 lib/io_streams/file/reader.rb
iostreams-0.12.0 lib/io_streams/file/reader.rb
iostreams-0.11.0 lib/io_streams/file/reader.rb
iostreams-0.10.1 lib/io_streams/file/reader.rb
iostreams-0.10.0 lib/io_streams/file/reader.rb
iostreams-0.9.1 lib/io_streams/file/reader.rb
iostreams-0.9.0 lib/io_streams/file/reader.rb