Class: Paperclip::Storage::Dropbox::PathGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/paperclip/storage/dropbox/path_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(attachment, attachment_options) ⇒ PathGenerator

Returns a new instance of PathGenerator.



8
9
10
11
# File 'lib/paperclip/storage/dropbox/path_generator.rb', line 8

def initialize(attachment, attachment_options)
  @attachment = attachment
  @attachment_options = attachment_options
end

Instance Method Details

#generate(style) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/paperclip/storage/dropbox/path_generator.rb', line 13

def generate(style)
  path = if normal_path_style?
           generate_from_string(style)
         else
           generate_from_proc(style)
         end
  path
end