class MiniPaperclip::Storage::Base
Attributes
attachment[R]
config[R]
interpolator[R]
Public Class Methods
new(attachment, config)
click to toggle source
# File lib/mini_paperclip/storage/base.rb, line 8 def initialize(attachment, config) @attachment = attachment @config = config @interpolator = Interpolator.new(attachment, config) @deletes = [] end
Public Instance Methods
interpolate(template, style)
click to toggle source
# File lib/mini_paperclip/storage/base.rb, line 28 def interpolate(template, style) @interpolator.interpolate(template, style) end
path_for(style)
click to toggle source
# File lib/mini_paperclip/storage/base.rb, line 19 def path_for(style) template = if @attachment.original_filename.nil? @config.url_missing_path else @config.url_path end interpolate(template, style) end
url_for_read(style)
click to toggle source
# File lib/mini_paperclip/storage/base.rb, line 15 def url_for_read(style) "#{@config.url_scheme}://#{host}/#{path_for(style)}" end
Private Instance Methods
debug(str)
click to toggle source
# File lib/mini_paperclip/storage/base.rb, line 34 def debug(str) MiniPaperclip.config.logger.debug("[mini_paperclip] #{str}") end