Sha256: 204908585fc07da0379f207557e59b1fe6c377ec1e9d24c4de3c23addfeec1d1

Contents?: true

Size: 575 Bytes

Versions: 11

Compression:

Stored size: 575 Bytes

Contents

module Torch
  module Utils
    module Data
      module DataPipes
        module Iter
          class StreamWrapper
            def initialize(file_obj)
              @file_obj = file_obj
            end

            def gets(...)
              @file_obj.gets(...)
            end

            def close
              @file_obj.close
            end

            # TODO improve
            def self.close_streams(cls)
              if cls.is_a?(StreamWrapper)
                cls.close
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
torch-rb-0.18.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.17.1 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.17.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.16.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.15.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.14.1 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.14.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.13.2 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.13.1 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.13.0 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb
torch-rb-0.12.2 lib/torch/utils/data/data_pipes/iter/stream_wrapper.rb