class Paperclip::Document::Processor
Main processor
Attributes
instance[R]
tmp_dir[R]
Public Class Methods
new(file, options = {}, attachment = nil)
click to toggle source
Calls superclass method
# File lib/paperclip/document/processor.rb, line 7 def initialize(file, options = {}, attachment = nil) super(file, options, attachment) @instance = @attachment.instance @tmp_dir = Pathname.new(Dir.tmpdir).join('paperclip-document-' + Time.now.to_i.to_s(36) + rand(1_000_000_000).to_s(36)) end
Public Instance Methods
basename()
click to toggle source
# File lib/paperclip/document/processor.rb, line 17 def basename file_path.basename.to_s.gsub(/\.[^\.]+/, '') end
file_path()
click to toggle source
# File lib/paperclip/document/processor.rb, line 13 def file_path Pathname.new(@file.path) end