Sha256: a9dfe4cacfe31bc53d00a2bd4bbadf2c5421de3121276db357bf620c59ec64a4

Contents?: true

Size: 447 Bytes

Versions: 7

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module Lt
  module Lcms
    module Lesson
      module Downloader
        class PDF < Base
          MIME_TYPE = 'application/pdf'

          def self.gdoc_file_url(id)
            "https://docs.google.com/file/d/#{id}"
          end

          def pdf_content
            service.get_file(file_id, download_dest: StringIO.new, supports_all_drives: true).string
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lt-lcms-0.6.0 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.5.0 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.4.4 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.4.3 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.4.2 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.4.1 lib/lt/lcms/lesson/downloader/pdf.rb
lt-lcms-0.4.0 lib/lt/lcms/lesson/downloader/pdf.rb