Class: Svn::Log::Application::SearchCommand
- Inherits:
-
Object
- Object
- Svn::Log::Application::SearchCommand
- Defined in:
- lib/svnlog.rb
Overview
A command for searching an index
Defined Under Namespace
Classes: SvnLogTextPrinter, SvnLogXmlPrinter
Instance Method Summary collapse
-
#initialize(argv) ⇒ SearchCommand
constructor
A new instance of SearchCommand.
- #parse_options(argv) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ SearchCommand
Returns a new instance of SearchCommand.
130 131 132 133 |
# File 'lib/svnlog.rb', line 130 def initialize(argv) (argv) @printer ||= SvnLogTextPrinter end |
Instance Method Details
#parse_options(argv) ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/svnlog.rb', line 135 def (argv) OptionParser.new do |opt| opt. = <<END Searches an index for log entries that match a query. Examples: svnlog search -p C:\\MyIndex -q \"Fixed\" svnlog search -p C:\\MyIndex -q \"Fixed\" --xml Usage: svnlog search [options] END opt.on("-p", "--path <val>", "The path to the index") { |@path| } opt.on("-q", "--query <val>", "The search query") { |@query| } opt.on("-x", "--xml", "Output in XML") { @printer = SvnLogXmlPrinter } opt.parse!(argv) end end |