class S3Antivirus::Tagger
Public Class Methods
new(s3_record)
click to toggle source
# File lib/s3_antivirus/tagger.rb, line 6 def initialize(s3_record) @s3_record = s3_record @bucket, @key, @version = s3_record.bucket, s3_record.key, s3_record.version @tag_key = conf['tag_key'] end
Public Instance Methods
tag(value)
click to toggle source
Different tag values:
clean inflected oversized
# File lib/s3_antivirus/tagger.rb, line 18 def tag(value) params = { bucket: @bucket, key: @key, tagging: {tag_set: [{key: @tag_key, value: value}]} } params[:version_id] = @version if @version s3.put_object_tagging(params) end