class Poto::FileRepository::AWS::S3
Attributes
bucket[R]
client[R]
Public Class Methods
new(bucket:, client: Client.new(bucket))
click to toggle source
# File lib/poto/file_repository/aws/s3.rb, line 11 def initialize(bucket:, client: Client.new(bucket)) @bucket = bucket @client = client end
Public Instance Methods
all(prefix:, page:, per_page:)
click to toggle source
# File lib/poto/file_repository/aws/s3.rb, line 20 def all(prefix:, page:, per_page:) objects = client.objects( page: page, per_page: per_page, prefix: prefix ) FileCollectionMapper.new(objects).call end
url(id)
click to toggle source
# File lib/poto/file_repository/aws/s3.rb, line 16 def url(id) client.url(id) end