Class Drydock::ArgError

  1. lib/drydock.rb
Parent: RuntimeError

Methods

public class

  1. new

public instance

  1. message
  2. usage

Attributes

arg [R]
cmd [R]
msg [R]

Public class methods

new (*args)
[show source]
    # File lib/drydock.rb, line 46
46:     def initialize(*args)
47:       @msg = args.shift if args.size == 1
48:       @arg, @cmd, @msg = *args
49:       @cmd ||= 'COMMAND'
50:       @msg = nil if @msg && @msg.empty?
51:     end

Public instance methods

message ()
[show source]
    # File lib/drydock.rb, line 52
52:     def message; @msg || "Error: No #{@arg} provided"; end
usage ()
[show source]
    # File lib/drydock.rb, line 53
53:     def usage; "See: #{$0} #{@cmd} -h"; end