class Svnx::Base::CommandLine
Attributes
error[R]
output[R]
status[R]
Public Class Methods
new(subcommand: nil, xml: true, caching: false, args: Array.new)
click to toggle source
# File lib/svnx/base/cmdline.rb, line 13 def initialize subcommand: nil, xml: true, caching: false, args: Array.new @subcommand = subcommand @xml = xml @caching = caching @args = args end
Public Instance Methods
command()
click to toggle source
# File lib/svnx/base/cmdline.rb, line 20 def command Array.new.tap do |a| a << 'svn' a << @subcommand if @xml a << '--xml' end a.concat @args end end
execute()
click to toggle source
# File lib/svnx/base/cmdline.rb, line 31 def execute cmdline = ::Command::Cacheable::Command.new command, caching: @caching, cachedir: Svnx::Env.instance.cache_dir cmdline.execute @output = cmdline.output @error = cmdline.error @status = cmdline.status @output end