Class: Bulwark::FilePermittor
- Inherits:
-
Object
- Object
- Bulwark::FilePermittor
- Defined in:
- lib/bulwark/file_permittor.rb
Instance Attribute Summary collapse
-
#permission ⇒ Object
readonly
Returns the value of attribute permission.
Instance Method Summary collapse
- #change_permissions ⇒ Object
-
#initialize(command) ⇒ FilePermittor
constructor
A new instance of FilePermittor.
- #s3_bucket ⇒ Object
Constructor Details
#initialize(command) ⇒ FilePermittor
5 6 7 |
# File 'lib/bulwark/file_permittor.rb', line 5 def initialize(command) = (command.first) end |
Instance Attribute Details
#permission ⇒ Object (readonly)
Returns the value of attribute permission.
3 4 5 |
# File 'lib/bulwark/file_permittor.rb', line 3 def end |
Instance Method Details
#change_permissions ⇒ Object
9 10 11 12 13 14 |
# File 'lib/bulwark/file_permittor.rb', line 9 def s3_bucket.files.each do |file| Aws::S3::ObjectAcl.new(s3_bucket.name, file[:key], client: s3_bucket.client).put({ acl: }) puts "#{file[:file_name]} is now #{permission}" end end |
#s3_bucket ⇒ Object
16 17 18 |
# File 'lib/bulwark/file_permittor.rb', line 16 def s3_bucket @s3_bucket ||= Bulwark::S3Bucket.new end |