Class: Todidnt::GitCommand
- Inherits:
- 
      Object
      
        - Object
- Todidnt::GitCommand
 
- Defined in:
- lib/todidnt/git_command.rb
Instance Method Summary collapse
- #command_with_options ⇒ Object
- 
  
    
      #initialize(command, options)  ⇒ GitCommand 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of GitCommand. 
- #output_lines ⇒ Object
- #run! ⇒ Object
Constructor Details
#initialize(command, options) ⇒ GitCommand
| 3 4 5 6 | # File 'lib/todidnt/git_command.rb', line 3 def initialize(command, ) @command = command @options = end | 
Instance Method Details
#command_with_options ⇒ Object
| 16 17 18 19 20 21 22 23 24 | # File 'lib/todidnt/git_command.rb', line 16 def full_command = @command.to_s for option in @options full_command << " #{option.join(' ')}" end full_command end | 
#output_lines ⇒ Object
| 8 9 10 | # File 'lib/todidnt/git_command.rb', line 8 def output_lines run!.strip.split(/\n/) end | 
#run! ⇒ Object
| 12 13 14 | # File 'lib/todidnt/git_command.rb', line 12 def run! `git #{}` end |