Class: DrJekyll::UnzipCommand
- Inherits:
-
Object
- Object
- DrJekyll::UnzipCommand
- Defined in:
- lib/drjekyll/cli/unzip.rb
Overview
find a better name - why, why not ??
Instance Method Summary collapse
-
#initialize(catalog, opts) ⇒ UnzipCommand
constructor
A new instance of UnzipCommand.
- #run(args) ⇒ Object
- #unzip(key, theme) ⇒ Object
Constructor Details
#initialize(catalog, opts) ⇒ UnzipCommand
Returns a new instance of UnzipCommand.
8 9 10 11 |
# File 'lib/drjekyll/cli/unzip.rb', line 8 def initialize( catalog, opts ) @catalog = catalog @opts = opts end |
Instance Method Details
#run(args) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/drjekyll/cli/unzip.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 unzip( key, theme ) else ## todo: issue warning - why, why not?? puts "*** theme '#{key}' not found; sorry" end end |