Class: GitWrapper::Commands::Push
- Inherits:
-
Git
- Object
- Git
- GitWrapper::Commands::Push
show all
- Defined in:
- lib/git_wrapper/commands/push.rb
Instance Attribute Summary
Attributes inherited from Git
#error, #location_folder, #output
Instance Method Summary
collapse
Methods inherited from Git
#execute, #initialize, #result, #to_relative_path
Instance Method Details
#branch(branch) ⇒ Object
10
11
12
13
14
|
# File 'lib/git_wrapper/commands/push.rb', line 10
def branch(branch)
@branch = branch
@mode = :branch
self
end
|
#command ⇒ Object
21
22
23
|
# File 'lib/git_wrapper/commands/push.rb', line 21
def command
"push #{@remote} #{@mode == :branch ? @branch : '--tags'}"
end
|
#remote(remote) ⇒ Object
5
6
7
8
|
# File 'lib/git_wrapper/commands/push.rb', line 5
def remote(remote)
@remote = remote
self
end
|
16
17
18
19
|
# File 'lib/git_wrapper/commands/push.rb', line 16
def tags
@mode = :tags
self
end
|