Class: S3io::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/s3io/wrapper.rb

Overview

This class wraps an AWS S3 object in order to provide IO-like API. S3 objects wrapped this way can be used in methods that would otherwise expect an instance of File, StringIO etc.

Direct Known Subclasses

ReadWrapper, WriteWrapper

Instance Method Summary collapse

Constructor Details

#initialize(s3object) ⇒ Wrapper

Wraps an AWS::S3::S3Object into IO-like object.

Parameters:

  • s3object (AWS::S3::S3Object)

    an object to wrap



32
33
34
35
# File 'lib/s3io/wrapper.rb', line 32

def initialize(s3object)
  @s3object = s3object
  @pos = 0
end

Instance Method Details

#closeObject



37
38
39
40
41
42
# File 'lib/s3io/wrapper.rb', line 37

def close
  @s3object = nil
  @pos = 0

  return nil
end