Class: Pageflow::Panorama::Package

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
UploadableFile
Defined in:
app/models/pageflow/panorama/package.rb

Instance Method Summary collapse

Instance Method Details

#index_document_pathObject



41
42
43
44
45
# File 'app/models/pageflow/panorama/package.rb', line 41

def index_document_path
  if attachment_on_s3.present? && index_document
    File.join(Panorama.config.packages_base_path, unpack_base_path, index_document)
  end
end

#ready?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'app/models/pageflow/panorama/package.rb', line 56

def ready?
  unpacked?
end

#retry!Object

UploadableFile-overrides



52
53
54
# File 'app/models/pageflow/panorama/package.rb', line 52

def retry!
  retry_unpacking!
end

#thumbnail_url(*args) ⇒ Object



37
38
39
# File 'app/models/pageflow/panorama/package.rb', line 37

def thumbnail_url(*args)
  thumbnail.url(*args)
end

#unpack_base_pathObject



47
48
49
# File 'app/models/pageflow/panorama/package.rb', line 47

def unpack_base_path
  attachment_on_s3.present? ? File.dirname(attachment_on_s3.path(:unpacked)) : nil
end