Module: Dry::CLI::Usage
- Defined in:
- lib/patches/dry-cli.rb
Class Method Summary collapse
-
.call(result) ⇒ String
Overwrites the original ‘call’ method to allow a global header and footer wrap for the help text.
- .original_call ⇒ Object
Class Method Details
.call(result) ⇒ String
Overwrites the original ‘call’ method to allow a global header and footer wrap for the help text.
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/patches/dry-cli.rb', line 124 def call(result) help_text = original_call(result) global_header = Dry::CLI::Command.global_header = Dry::CLI::Command. help_text.prepend(global_header + "\n") unless (global_header.nil? || global_header.empty?) help_text += "\n" + unless (.nil? || .empty?) help_text end |
.original_call ⇒ Object
118 |
# File 'lib/patches/dry-cli.rb', line 118 alias_method :original_call, :call |