Class: Morpheus::Cli::OptionParser

Inherits:
OptionParser
  • Object
show all
Defined in:
lib/morpheus/cli/option_parser.rb

Overview

an enhanced OptionParser not used yet, maybe ever =o

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Returns the value of attribute footer.



10
11
12
# File 'lib/morpheus/cli/option_parser.rb', line 10

def footer
  @footer
end

Instance Method Details

#full_help_message ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/morpheus/cli/option_parser.rb', line 22

def full_help_message
  out = ""
  out << original_to_s
  if footer
    out << footer.to_s.strip
    out << "\n"
  end
  out
end

#original_to_s ⇒ Object



16
# File 'lib/morpheus/cli/option_parser.rb', line 16

alias :original_to_s :to_s

#to_s ⇒ Object



18
19
20
# File 'lib/morpheus/cli/option_parser.rb', line 18

def to_s
  full_help_message
end