Class: Swa::S3::ObjectListEntry

Inherits:
Record
  • Object
show all
Defined in:
lib/swa/s3/object_list_entry.rb

Direct Known Subclasses

ObjectPrefix, ObjectSummary

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

#data, delegate, list

Constructor Details

#initialize(bucket_name, aws_record) ⇒ ObjectListEntry

Returns a new instance of ObjectListEntry.



8
9
10
11
# File 'lib/swa/s3/object_list_entry.rb', line 8

def initialize(bucket_name, aws_record)
  @bucket_name = bucket_name
  super(aws_record)
end

Instance Attribute Details

#bucket_nameObject (readonly)

Returns the value of attribute bucket_name.



13
14
15
# File 'lib/swa/s3/object_list_entry.rb', line 13

def bucket_name
  @bucket_name
end

Instance Method Details

#summaryObject



19
20
21
22
23
24
25
# File 'lib/swa/s3/object_list_entry.rb', line 19

def summary
  [
    pad(column1, 20),
    rpad(column2, 10),
    uri
  ].join("  ")
end

#to_sObject



15
16
17
# File 'lib/swa/s3/object_list_entry.rb', line 15

def to_s
  uri
end