Class: Jekyll::RemoteTheme::Downloader
- Inherits:
-
Object
- Object
- Jekyll::RemoteTheme::Downloader
- Defined in:
- lib/jekyll-remote-theme/downloader.rb
Constant Summary collapse
- HOST =
"https://codeload.github.com".freeze
- PROJECT_URL =
"https://github.com/benbalter/jekyll-remote-theme".freeze
- TYPHOEUS_OPTIONS =
{ :headers => { :user_agent => "Jekyll Remote Theme/#{VERSION} (+#{PROJECT_URL})", }, :verbose => (Jekyll.logger.level == :debug), }.freeze
Instance Method Summary collapse
- #downloaded? ⇒ Boolean
-
#initialize(theme) ⇒ Downloader
constructor
A new instance of Downloader.
- #run ⇒ Object
Constructor Details
#initialize(theme) ⇒ Downloader
Returns a new instance of Downloader.
18 19 20 |
# File 'lib/jekyll-remote-theme/downloader.rb', line 18 def initialize(theme) @theme = theme end |
Instance Method Details
#downloaded? ⇒ Boolean
34 35 36 |
# File 'lib/jekyll-remote-theme/downloader.rb', line 34 def downloaded? @downloaded ||= theme_dir_exists? && !theme_dir_empty? end |