Class: Morpheus::Cli::OptionParser
- Inherits:
-
OptionParser
- Object
- OptionParser
- Morpheus::Cli::OptionParser
- Defined in:
- lib/morpheus/cli/option_parser.rb
Overview
an enhanced OptionParser not used yet, maybe ever =o
Instance Attribute Summary collapse
-
#footer ⇒ Object
Returns the value of attribute footer.
Instance Method Summary collapse
Instance Attribute Details
#footer ⇒ Object
Returns the value of attribute footer.
10 11 12 |
# File 'lib/morpheus/cli/option_parser.rb', line 10 def @footer end |
Instance Method Details
#full_help_message ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/morpheus/cli/option_parser.rb', line 18 def out = "" #out << original_to_s if out << "#{}".sub(/\n?\z/, "\n") end if !self.to_a.empty? #out << "Options:\n" out << summarize().join("") end if # nice_footer = footer.split("\n").collect {|line| "#{summary_indent}#{line}" }.join("\n") = out << "\n" out << "#{}".sub(/\n?\z/, "\n") # out << "\n" end out end |
#original_to_s ⇒ Object
12 |
# File 'lib/morpheus/cli/option_parser.rb', line 12 alias :original_to_s :to_s |
#to_s ⇒ Object
14 15 16 |
# File 'lib/morpheus/cli/option_parser.rb', line 14 def to_s end |