Class: Lt::Lcms::Lesson::Downloader::Gdoc
- Defined in:
- lib/lt/lcms/lesson/downloader/gdoc.rb
Constant Summary collapse
- GOOGLE_DRAWING_RE =
%r{https?://docs\.google\.com/?[^"]*/drawings/[^"]*}i.freeze
- GOOGLE_URL_RE =
%r{https://www\.google\.com/url\?q=([^&]*)&?.*}i.freeze
- MIME_TYPE =
'application/vnd.google-apps.document'
- MIME_TYPE_EXPORT =
'text/html'
Constants inherited from Base
Base::MAX_RETRY_COUNT, Base::RETRY_DELAYES
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#file, #file_id, file_id_for, #initialize
Constructor Details
This class inherits a constructor from Lt::Lcms::Lesson::Downloader::Base
Class Method Details
.gdoc_file_url(id) ⇒ Object
15 16 17 |
# File 'lib/lt/lcms/lesson/downloader/gdoc.rb', line 15 def self.gdoc_file_url(id) "https://docs.google.com/document/d/#{id}" end |
Instance Method Details
#download ⇒ Object
19 20 21 22 23 |
# File 'lib/lt/lcms/lesson/downloader/gdoc.rb', line 19 def download super do |html| fix_links handle_google_drawings(html) end end |