Class: Tumbler::Cli
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Tumbler::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/tumbler/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
7 |
# File 'lib/tumbler/cli.rb', line 7 def self.; "tumbler name [options]"; end |
Instance Method Details
#setup_gem ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/tumbler/cli.rb', line 17 def setup_gem path = File.join [:root], name case when [:update] then Tumbler::Updater.new(path, ).update when File.exist?(path) then raise("Directory path #{path} already exists!") else FileUtils.mkdir_p(path) ; Tumbler::Generate.app(path, name, ).write end say "Gem #{name} successfully generated!", :green end |