class FileLocator::S3File

Attributes

bucket[R]
key[R]

Public Class Methods

new(uri) click to toggle source
# File lib/file_locator.rb, line 11
def initialize(uri)
  uri = Addressable::URI.parse(uri)
  @bucket = URI.decode(uri.host)
  @key = URI.decode(uri.path).sub(%r{^/*(.+)/*$}, '\1')
end

Public Instance Methods

object() click to toggle source
# File lib/file_locator.rb, line 17
def object
  @object ||= Aws::S3::Object.new(bucket_name: bucket, key: key)
end