# frozen_string_literal: true

class ExtractExifData < InteractorBase
  requires :file

  def call
    context.exif_data = HashWithIndifferentAccess.new(
      JSON.parse(`#{EXIFTOOL} #{file.path} -json -d '%Y-%m-%d %T' -g`).first
    )
  end
end
