Exception: Branch::Name::OptionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/branch/name/option_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, command) ⇒ OptionError

Returns a new instance of OptionError.



8
9
10
11
12
# File 'lib/branch/name/option_error.rb', line 8

def initialize(msg, command)
  super(msg)

  @command = command
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



6
7
8
# File 'lib/branch/name/option_error.rb', line 6

def command
  @command
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/branch/name/option_error.rb', line 14

def message
  "ERROR: \"branch-name #{command}\" #{super}"
end