Class: EacGit::Local::Remote::Push

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_git/local/remote/push.rb

Instance Method Summary collapse

Instance Method Details

#git_command_argsEnumerable<String>

Returns:

  • (Enumerable<String>)


27
28
29
30
31
# File 'lib/eac_git/local/remote/push.rb', line 27

def git_command_args
  r = ['push', remote.name]
  r << '--force' if force?
  r + refspecs
end

#immutable_constructor_argsArray<Object>

Returns:

  • (Array<Object>)


17
18
19
# File 'lib/eac_git/local/remote/push.rb', line 17

def immutable_constructor_args
  [remote]
end

#performvoid

This method returns an undefined value.



22
23
24
# File 'lib/eac_git/local/remote/push.rb', line 22

def perform
  local.command(*git_command_args).system!
end