Exception: Docopt::Exit

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/docopt.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = '') ⇒ Exit

Returns a new instance of Exit.



21
22
23
# File 'lib/docopt.rb', line 21

def initialize(message='')
  @@message = (message + "\n" + @@usage).strip
end

Class Method Details

.set_usage(usage) ⇒ Object



13
14
15
# File 'lib/docopt.rb', line 13

def self.set_usage(usage)
  @@usage = usage ? usage : ''
end

.usageObject



9
10
11
# File 'lib/docopt.rb', line 9

def self.usage
  @@usage
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/docopt.rb', line 17

def message
  @@message
end