Class: ActiveStorage::HotCell::Client::Previewers::Pdf::Mutool

Inherits:
Previewer::MuPDFPreviewer
  • Object
show all
Includes:
ActiveStorage::HotCell::Client::Previewers::Previewing
Defined in:
lib/active_storage/hot_cell/client/previewers/pdf/mutool.rb

Overview

What Rails configures in config.active_storage.previewers, replacing MuPDFPreviewer.

Class Method Summary collapse

Methods included from ActiveStorage::HotCell::Client::Previewers::Previewing

included, #preview

Class Method Details

.accept?(blob) ⇒ Boolean

Delegates to the superclass's content-type predicate rather than restating the list, so the accepted set cannot drift away from the one Rails ships.

Returns:

  • (Boolean)


21
22
23
# File 'lib/active_storage/hot_cell/client/previewers/pdf/mutool.rb', line 21

def self.accept?(blob)
  pdf? blob.content_type
end