Class: Fog::AWS::Storage::File::PartList
- Inherits:
-
Object
- Object
- Fog::AWS::Storage::File::PartList
- Defined in:
- lib/fog/aws/models/storage/file.rb
Instance Method Summary collapse
- #clear! ⇒ Object
-
#initialize(parts = []) ⇒ PartList
constructor
A new instance of PartList.
- #push(part) ⇒ Object
- #shift ⇒ Object
- #size ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(parts = []) ⇒ PartList
Returns a new instance of PartList.
41 42 43 44 |
# File 'lib/fog/aws/models/storage/file.rb', line 41 def initialize(parts = []) @parts = parts @mutex = Mutex.new end |
Instance Method Details
#clear! ⇒ Object
54 55 56 |
# File 'lib/fog/aws/models/storage/file.rb', line 54 def clear! @mutex.synchronize { @parts.clear } end |
#push(part) ⇒ Object
46 47 48 |
# File 'lib/fog/aws/models/storage/file.rb', line 46 def push(part) @mutex.synchronize { @parts.push(part) } end |
#shift ⇒ Object
50 51 52 |
# File 'lib/fog/aws/models/storage/file.rb', line 50 def shift @mutex.synchronize { @parts.shift } end |
#size ⇒ Object
58 59 60 |
# File 'lib/fog/aws/models/storage/file.rb', line 58 def size @mutex.synchronize { @parts.size } end |
#to_a ⇒ Object
62 63 64 |
# File 'lib/fog/aws/models/storage/file.rb', line 62 def to_a @mutex.synchronize { @parts.dup } end |