Sha256: 6238a5755b89e8e5662f38987f11003d42447ec79d64de744173734c5a3b6a3f
Contents?: true
Size: 402 Bytes
Versions: 3
Compression:
Stored size: 402 Bytes
Contents
module S3Repo ## # Base object, used to provide common attributes class Base def initialize(params = {}) @options = params end private def bucket @bucket ||= @options[:bucket] || ENV['S3_BUCKET'] return @bucket if @bucket fail('No bucket given') end def client @client ||= @options[:client] || Client.new(bucket: bucket) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
s3repo-0.0.3 | lib/s3repo/base.rb |
s3repo-0.0.2 | lib/s3repo/base.rb |
s3repo-0.0.1 | lib/s3repo/base.rb |