class Paperclip::UrlGenerator

Public Class Methods

new(attachment, attachment_options) click to toggle source
# File lib/paperclip/url_generator.rb, line 5
def initialize(attachment, attachment_options)
  @attachment = attachment
  @attachment_options = attachment_options
end

Public Instance Methods

for(style_name, options) click to toggle source
# File lib/paperclip/url_generator.rb, line 10
def for(style_name, options)
  escape_url_as_needed(
    timestamp_as_needed(
      @attachment_options[:interpolator].interpolate(most_appropriate_url, @attachment, style_name),
      options
  ), options)
end