module ActiveStorage::Blob::Analyzable

def analyze_later

again (e.g. if you add a new analyzer or modify an existing one).
This method is automatically called for a blob when it's attached for the first time. You can call it to analyze a blob

Enqueues an ActiveStorage::AnalyzeJob which calls #analyze, or calls #analyze inline based on analyzer class configuration.
def analyze_later
  if analyzer_class.analyze_later?
    ActiveStorage::AnalyzeJob.perform_later(self)
  else
    analyze
  end
end