Exception: Drydock::ArgError
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Instance Method Summary collapse
-
#initialize(*args) ⇒ ArgError
constructor
A new instance of ArgError.
- #message ⇒ Object
- #usage ⇒ Object
Constructor Details
#initialize(*args) ⇒ ArgError
Returns a new instance of ArgError.
45 46 47 48 49 50 |
# File 'lib/drydock.rb', line 45 def initialize(*args) @msg = args.shift if args.size == 1 @arg, @cmd, @msg = *args @cmd ||= 'COMMAND' @msg = nil if @msg && @msg.empty? end |
Instance Attribute Details
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
44 45 46 |
# File 'lib/drydock.rb', line 44 def arg @arg end |
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
44 45 46 |
# File 'lib/drydock.rb', line 44 def cmd @cmd end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
44 45 46 |
# File 'lib/drydock.rb', line 44 def msg @msg end |