Exception: KXI::Exceptions::ArgumentException

Inherits:
Exception
  • Object
show all
Defined in:
lib/kxi/exceptions/argument_exception.rb

Overview

Raised when command-line parser encounters an error

Instance Method Summary collapse

Constructor Details

#initialize(arg, msg) ⇒ ArgumentException

Instantiates the KXI::Exceptions::ArgumentException class



16
17
18
19
# File 'lib/kxi/exceptions/argument_exception.rb', line 16

def initialize(arg, msg)
  super("<#{arg}> #{msg}")
  @arg = arg
end

Instance Method Details

#argumentString

Get the name of argument



9
10
11
# File 'lib/kxi/exceptions/argument_exception.rb', line 9

def argument
  @arg
end