Class: Svnx::Base::Command
- Inherits:
 - 
      Object
      
        
- Object
 - Svnx::Base::Command
 
 
- Includes:
 - Logue::Loggable
 
- Defined in:
 - lib/svnx/base/command.rb
 
Direct Known Subclasses
EntriesCommand, Cat::Command, Commit::Command, Diff::Command, Merge::Command, Propset::Command, Update::Command
Instance Attribute Summary collapse
- 
  
    
      #error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute error.
 - 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute options.
 - 
  
    
      #output  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute output.
 - 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute status.
 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(options, cls: nil, optcls: nil, exec: nil, xml: false, caching: caching?  )  ⇒ Command 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Command.
 
Constructor Details
#initialize(options, cls: nil, optcls: nil, exec: nil, xml: false, caching: caching? ) ⇒ Command
Returns a new instance of Command.
      34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57  | 
    
      # File 'lib/svnx/base/command.rb', line 34 def initialize , cls: nil, optcls: nil, exec: nil, xml: false, caching: caching? factory = CommandFactory.new params = factory.create self.class, cmdlinecls: cls, optcls: optcls optcls ||= params[:options_class] @options = optcls.new cmdargs = @options.to_args subcommand = params[:subcommand] cls ||= params[:command_line_class] @cmdline = exec || cls.new(subcommand: subcommand, xml: xml, caching: caching, args: cmdargs) debug "@cmdline: #{@cmdline}" @output = @cmdline.execute debug "@output: #{@output && @output[0 .. 100]}" @error = @cmdline.error debug "@error: #{@error}" @status = @cmdline.status debug "@status: #{@status}" end  | 
  
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
      29 30 31  | 
    
      # File 'lib/svnx/base/command.rb', line 29 def error @error end  | 
  
#options ⇒ Object (readonly)
Returns the value of attribute options.
      32 33 34  | 
    
      # File 'lib/svnx/base/command.rb', line 32 def @options end  | 
  
#output ⇒ Object (readonly)
Returns the value of attribute output.
      28 29 30  | 
    
      # File 'lib/svnx/base/command.rb', line 28 def output @output end  | 
  
#status ⇒ Object (readonly)
Returns the value of attribute status.
      30 31 32  | 
    
      # File 'lib/svnx/base/command.rb', line 30 def status @status end  | 
  
Class Method Details
.caching ⇒ Object
      15 16 17 18 19  | 
    
      # File 'lib/svnx/base/command.rb', line 15 def caching define_method :caching? do true end end  | 
  
.noncaching ⇒ Object
      21 22 23 24 25  | 
    
      # File 'lib/svnx/base/command.rb', line 21 def noncaching define_method :caching? do false end end  |