Class: Svn::Log::Application::IndexCommand
- Inherits:
-
Object
- Object
- Svn::Log::Application::IndexCommand
- Defined in:
- lib/svnlog.rb
Overview
A command for populating an index
Instance Method Summary collapse
-
#initialize(argv) ⇒ IndexCommand
constructor
A new instance of IndexCommand.
- #parse_options(argv) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ IndexCommand
Returns a new instance of IndexCommand.
71 72 73 |
# File 'lib/svnlog.rb', line 71 def initialize(argv) (argv) end |
Instance Method Details
#parse_options(argv) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/svnlog.rb', line 75 def (argv) OptionParser.new do |opt| opt. = "Populates an index with log entries from an SVN repository.\n\nExamples:\n svnlog index -p C:\\\\MyIndex -r svn://server/repos/path/to/something\n svnlog index -p C:\\\\MyIndex\n\nUsage: svnlog index [options]\n" opt.on("-p", "--path <val>", "The path to the index") { |@path| } opt.on("-r", "--repository-url <val>", "The url of the SVN repository") { |@repository_url| } opt.parse!(argv) end end |
#run ⇒ Object
92 93 94 |
# File 'lib/svnlog.rb', line 92 def run Index.new(@path, @repository_url).update end |