Class: VPM::CommandOptions::Install

Inherits:
AbstractCommandOptions show all
Defined in:
lib/vpm/command_options/install.rb

Instance Attribute Summary

Attributes inherited from AbstractCommandOptions

#opts_parser

Instance Method Summary collapse

Methods inherited from AbstractCommandOptions

#parse!, #parser

Instance Method Details

#define_parser(parser, options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/vpm/command_options/install.rb', line 4

def define_parser(parser, options)
  parser.banner = "Usage: vpm install <plugin> [options]"

  parser.on("-g", "--git [REMOTE]", "Install from a Git repository") do |git_url|
    options[:type] = :git
    options[:remote] = git_url
  end

  parser.on("-t", "--tag [TAG]", "Specify a tag for the Git repository") do |tag|
    options[:tag] = tag
  end
end