Class: DotModule::CLI
- Inherits:
-
Thor
- Object
- Thor
- DotModule::CLI
- Defined in:
- lib/dotmodule/cli.rb
Instance Method Summary collapse
- #info ⇒ Object
-
#install(*modules) ⇒ Object
option :modules, :type => :array.
Instance Method Details
#info ⇒ Object
23 24 25 26 |
# File 'lib/dotmodule/cli.rb', line 23 def info collection = DotModule::Collection.new(Dir.pwd) puts collection end |
#install(*modules) ⇒ Object
option :modules, :type => :array
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dotmodule/cli.rb', line 7 def install(*modules) collection = DotModule::Collection.new(Dir.pwd) if modules.size.zero? modules = case ask("#{collection}\nNo module argument passed. Install (c)ore/(a)ll/(n)one? [n]:").downcase when 'a' collection.modules when 'c' collection.core_modules else #none [] end end collection.install_modules(modules) end |