Class: GitWrapper::Commands::Config

Inherits:
Git
  • Object
show all
Defined in:
lib/git_wrapper/commands/config.rb

Instance Attribute Summary

Attributes inherited from Git

#error, #location_folder, #output

Instance Method Summary collapse

Methods inherited from Git

#execute, #initialize, #success?

Constructor Details

This class inherits a constructor from GitWrapper::Commands::Git

Instance Method Details

#commandObject



15
16
17
# File 'lib/git_wrapper/commands/config.rb', line 15

def command
  "config #{@key} #{@value}"
end

#key(key) ⇒ Object



5
6
7
8
# File 'lib/git_wrapper/commands/config.rb', line 5

def key(key)
  @key = key
  self
end

#resultObject



19
20
21
22
# File 'lib/git_wrapper/commands/config.rb', line 19

def result
  return @success if @value || !@success
  @output[0..(@output.length - 2)].strip
end

#value(value) ⇒ Object



10
11
12
13
# File 'lib/git_wrapper/commands/config.rb', line 10

def value(value)
  @value = value
  self
end