Method: Coglius::Command#initialize
- Defined in:
- lib/coglius/command.rb
#initialize(options) ⇒ Command
Create a new command.
- options
-
Keys should be:
names-
A String, Symbol, or Array of String or Symbol that represents the name(s) of this command (required).
description-
short description of this command as a String
arguments_name-
description of the arguments as a String, or nil if this command doesn’t take arguments
long_desc-
a longer description of the command, possibly with multiple lines. A double line-break is treated as a paragraph break. No other formatting is respected, though inner whitespace is maintained.
skips_pre-
if true, this command advertises that it doesn’t want the pre block called first
skips_post-
if true, this command advertises that it doesn’t want the post block called after it
skips_around-
if true, this command advertises that it doesn’t want the around block called
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/coglius/command.rb', line 46 def initialize() super([:names],[:description],[:long_desc]) @arguments_description = [:arguments_name] || '' = Array([:arguments_options]).flatten @skips_pre = [:skips_pre] @skips_post = [:skips_post] @skips_around = [:skips_around] @commands_declaration_order = [] @flags_declaration_order = [] @switches_declaration_order = [] clear_nexts end |