Exception: GitProc::ParkedChangesError

Inherits:
GitProcessError show all
Includes:
AbstractErrorBuilder
Defined in:
lib/git-process/parked_changes_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AbstractErrorBuilder

#append_commands, #build_message, #commands, #shell_escaped_files

Constructor Details

#initialize(lib) ⇒ ParkedChangesError

Returns a new instance of ParkedChangesError.



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

def initialize(lib)
  @lib = lib
  msg = build_message
  super(msg)
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message.



20
21
22
# File 'lib/git-process/parked_changes_error.rb', line 20

def error_message
  @error_message
end

#libObject (readonly)

Returns the value of attribute lib.



20
21
22
# File 'lib/git-process/parked_changes_error.rb', line 20

def lib
  @lib
end

Instance Method Details

#build_commandsObject



35
36
37
# File 'lib/git-process/parked_changes_error.rb', line 35

def build_commands
  ['git branch -m _parking_ my_feature_branch']
end

#human_messageObject



30
31
32
# File 'lib/git-process/parked_changes_error.rb', line 30

def human_message
  "You made your changes on the the '_parking_' branch instead of a feature branch.\n"+'Please rename the branch to be a feature branch.'
end