Module: AWS::S3::Tree::Parent
- Included in:
- AWS::S3::Tree, BranchNode
- Defined in:
- lib/aws/s3/tree/parent.rb
Overview
Common methods for tree nodes that are parents to other nodes (AWS::S3::Tree and BranchNode).
Instance Attribute Summary collapse
-
#collection ⇒ ObjectCollection, ...
readonly
The collection whose members will be explored using the tree.
-
#delimiter ⇒ String
readonly
When looking at S3 keys as a tree, the delimiter defines what string pattern seperates each level of the tree.
-
#prefix ⇒ String?
readonly
A tree may have a prefix of where in the bucket to be based from.
Instance Method Summary collapse
-
#append? ⇒ Boolean
Returns true if the tree is set to auto-append the delimiter to the prefix when the prefix does not end with the delimiter.
-
#children ⇒ Tree::ChildCollection
A collection representing all the child nodes of this node.
- #inspect ⇒ Object
Instance Attribute Details
#collection ⇒ ObjectCollection, ... (readonly)
Returns The collection whose members will be explored using the tree.
49 50 51 |
# File 'lib/aws/s3/tree/parent.rb', line 49 def collection @collection end |
#delimiter ⇒ String (readonly)
When looking at S3 keys as a tree, the delimiter defines what string pattern seperates each level of the tree. The delimiter defaults to ‘/’ (like in a file system).
63 64 65 |
# File 'lib/aws/s3/tree/parent.rb', line 63 def delimiter @delimiter end |
#prefix ⇒ String? (readonly)
A tree may have a prefix of where in the bucket to be based from. A value of nil
means that the tree will include all objects in the collection.
56 57 58 |
# File 'lib/aws/s3/tree/parent.rb', line 56 def prefix @prefix end |
Instance Method Details
#append? ⇒ Boolean
Returns true if the tree is set to auto-append the delimiter to the prefix when the prefix does not end with the delimiter.
68 69 70 |
# File 'lib/aws/s3/tree/parent.rb', line 68 def append? @append end |
#children ⇒ Tree::ChildCollection
Returns A collection representing all the child nodes of this node. These may be either BranchNode objects or LeafNode objects.
75 76 77 78 79 80 |
# File 'lib/aws/s3/tree/parent.rb', line 75 def children Tree::ChildCollection.new(self, collection, :delimiter => delimiter, :prefix => prefix, :append => append?) end |
#inspect ⇒ Object
82 83 84 |
# File 'lib/aws/s3/tree/parent.rb', line 82 def inspect "<#{self.class}:#{collection.bucket.name}:#{prefix}>" end |