Class: FakeAWS::S3::Bucket
- Inherits:
-
Object
- Object
- FakeAWS::S3::Bucket
- Defined in:
- lib/fake_aws/s3/bucket.rb
Instance Attribute Summary collapse
-
#location_constraint ⇒ Object
readonly
Returns the value of attribute location_constraint.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
Instance Method Summary collapse
- #clear! ⇒ Object
- #empty? ⇒ Boolean
- #exists? ⇒ Boolean
-
#initialize(name, options = {}) ⇒ Bucket
constructor
A new instance of Bucket.
Constructor Details
#initialize(name, options = {}) ⇒ Bucket
Returns a new instance of Bucket.
8 9 10 11 12 |
# File 'lib/fake_aws/s3/bucket.rb', line 8 def initialize(name, = {}) @name = name @location_constraint = [:location_constraint] clear! end |
Instance Attribute Details
#location_constraint ⇒ Object (readonly)
Returns the value of attribute location_constraint.
16 17 18 |
# File 'lib/fake_aws/s3/bucket.rb', line 16 def location_constraint @location_constraint end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/fake_aws/s3/bucket.rb', line 14 def name @name end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
15 16 17 |
# File 'lib/fake_aws/s3/bucket.rb', line 15 def objects @objects end |
Instance Method Details
#clear! ⇒ Object
26 27 28 |
# File 'lib/fake_aws/s3/bucket.rb', line 26 def clear! @objects = ObjectCollection.new(self) end |
#empty? ⇒ Boolean
22 23 24 |
# File 'lib/fake_aws/s3/bucket.rb', line 22 def empty? objects.empty? end |
#exists? ⇒ Boolean
18 19 20 |
# File 'lib/fake_aws/s3/bucket.rb', line 18 def exists? true end |