Module: GitProc::AbstractErrorBuilder

Included in:
AbstractMergeErrorBuilder, ParkedChangesError
Defined in:
lib/git-process/abstract_error_builder.rb

Instance Method Summary collapse

Instance Method Details

#append_commandsObject



31
32
33
# File 'lib/git-process/abstract_error_builder.rb', line 31

def append_commands
  commands.empty? ? '' : "\n\nCommands:\n\n  #{commands.join("\n  ")}"
end

#build_commandsObject



41
42
43
# File 'lib/git-process/abstract_error_builder.rb', line 41

def build_commands
  []
end

#build_messageObject



24
25
26
27
28
# File 'lib/git-process/abstract_error_builder.rb', line 24

def build_message
  msg = human_message

  msg << append_commands
end

#commandsObject



19
20
21
# File 'lib/git-process/abstract_error_builder.rb', line 19

def commands
  @commands ||= build_commands
end

#human_messageObject



36
37
38
# File 'lib/git-process/abstract_error_builder.rb', line 36

def human_message
  ''
end

#shell_escaped_files(files) ⇒ Object



46
47
48
49
# File 'lib/git-process/abstract_error_builder.rb', line 46

def shell_escaped_files(files)
  shell_escaped_files = files.map { |f| f.shellescape }
  shell_escaped_files.join(' ')
end