Method: Paperclip::Storage::S3#s3_protocol

Defined in:
lib/paperclip/storage/s3.rb

#s3_protocol(style = default_style, with_colon = false) ⇒ Object



336
337
338
339
340
341
342
343
344
345
# File 'lib/paperclip/storage/s3.rb', line 336

def s3_protocol(style = default_style, with_colon = false)
  protocol = @s3_protocol
  protocol = protocol.call(style, self) if protocol.respond_to?(:call)

  if with_colon && !protocol.empty?
    "#{protocol}:"
  else
    protocol.to_s
  end
end