Class: DrJekyll::DownloadCommand
- Inherits:
-
Object
- Object
- DrJekyll::DownloadCommand
- Defined in:
- lib/drjekyll/cli/download.rb
Overview
find a better name - why, why not ??
Instance Method Summary collapse
- #download(key, theme) ⇒ Object
-
#initialize(catalog, opts) ⇒ DownloadCommand
constructor
A new instance of DownloadCommand.
- #run(args) ⇒ Object
Constructor Details
#initialize(catalog, opts) ⇒ DownloadCommand
Returns a new instance of DownloadCommand.
8 9 10 11 |
# File 'lib/drjekyll/cli/download.rb', line 8 def initialize( catalog, opts ) @catalog = catalog @opts = opts end |
Instance Method Details
#download(key, theme) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/drjekyll/cli/download.rb', line 27 def download( key, theme ) pak = Package.new( key, theme ) ## todo/fix: ## add puts "GET URL" w/ color (bright/bold green) pak.download end |
#run(args) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/drjekyll/cli/download.rb', line 13 def run( args ) ## note: required template name (defaults to starter for now) key = args[0] || 'starter' theme = @catalog.find( key ) if theme download( key, theme ) else ## todo: issue warning - why, why not?? puts "*** theme '#{key}' not found; sorry" end end |