Class: Commands::Pack::Install
- Inherits:
-
Object
- Object
- Commands::Pack::Install
- Defined in:
- lib/commands/plugin/commands.rb
Instance Method Summary collapse
-
#initialize(base_command) ⇒ Install
constructor
A new instance of Install.
- #options ⇒ Object
- #parse!(args) ⇒ Object
Constructor Details
#initialize(base_command) ⇒ Install
Returns a new instance of Install.
584 585 586 |
# File 'lib/commands/plugin/commands.rb', line 584 def initialize(base_command) @base_command = base_command end |
Instance Method Details
#options ⇒ Object
588 589 590 591 592 593 594 |
# File 'lib/commands/plugin/commands.rb', line 588 def OptionParser.new do |o| o.set_summary_indent(' ') o. = "Usage: #{@base_command.script_name} pack:install pack_file_or_url" o.define_head "Installs plugin pack at pack_file_or_url" end end |
#parse!(args) ⇒ Object
596 597 598 599 600 601 602 603 |
# File 'lib/commands/plugin/commands.rb', line 596 def parse!(args) uri = args.first plugin_pack = PluginPackParser.parse_spec_file(uri) plugin_pack.plugins.each do |plugin| puts "+ [Adding] #{plugin.name}" plugin.install end end |