Class: ActiveStorage::AsyncVariants::Transformer

Inherits:
Object
  • Object
show all
Defined in:
lib/active_storage/async_variants/transformer.rb

Instance Method Summary collapse

Instance Method Details

#initiate(source_url:, callback_url:, **options) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/active_storage/async_variants/transformer.rb', line 10

def initiate(source_url:, callback_url:, **options)
  raise NotImplementedError, "#{self.class}#initiate must kick off external processing"
end

#inline?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_storage/async_variants/transformer.rb', line 14

def inline?
  self.class.instance_method(:process).owner != ActiveStorage::AsyncVariants::Transformer
end

#process(file, **options) ⇒ Object

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/active_storage/async_variants/transformer.rb', line 6

def process(file, **options)
  raise NotImplementedError, "#{self.class}#process must return { io:, content_type:, filename: }"
end