Class: GLI::Commands::Doc::DocumentListener
- Inherits:
-
Object
- Object
- GLI::Commands::Doc::DocumentListener
- Defined in:
- lib/gli/commands/doc.rb
Overview
Interface for a listener that is called during various parts of the doc process
Instance Method Summary collapse
-
#beginning ⇒ Object
Called before processing begins.
-
#command(name, aliases, desc, long_desc, arg_name, arg_options) ⇒ Object
Gives you a command in the current context and creates a new context of this command.
-
#commands ⇒ Object
Called at the start of commands for the current context.
-
#default_command(name) ⇒ Object
Gives you the name of the current command in the current context.
-
#end_command(name) ⇒ Object
Ends a command, and “pops” you back up one context.
-
#end_commands ⇒ Object
Called when all commands for the current context have been vended.
-
#end_options ⇒ Object
Called when all options for the current context have been vended.
-
#ending ⇒ Object
Called when processing has completed.
-
#flag(name, aliases, desc, long_desc, default_value, arg_name, must_match, type) ⇒ Object
Gives you a flag in the current context.
-
#initialize(global_options, options, arguments, app) ⇒ DocumentListener
constructor
A new instance of DocumentListener.
-
#options ⇒ Object
Called at the start of options for the current context.
-
#program_desc(desc) ⇒ Object
Gives you the program description.
-
#program_long_desc(desc) ⇒ Object
Gives you the program long description.
-
#switch(name, aliases, desc, long_desc, negatable) ⇒ Object
Gives you a switch in the current context.
-
#version(version) ⇒ Object
Gives you the program version.
Constructor Details
#initialize(global_options, options, arguments, app) ⇒ DocumentListener
Returns a new instance of DocumentListener.
57 58 59 60 61 62 |
# File 'lib/gli/commands/doc.rb', line 57 def initialize(,,arguments,app) @global_options = @options = @arguments = arguments @app = app end |
Instance Method Details
#beginning ⇒ Object
Called before processing begins
64 65 66 |
# File 'lib/gli/commands/doc.rb', line 64 def beginning abstract! end |
#command(name, aliases, desc, long_desc, arg_name, arg_options) ⇒ Object
Gives you a command in the current context and creates a new context of this command
124 125 126 |
# File 'lib/gli/commands/doc.rb', line 124 def command(name,aliases,desc,long_desc,arg_name,) abstract! end |
#commands ⇒ Object
Called at the start of commands for the current context
99 100 101 |
# File 'lib/gli/commands/doc.rb', line 99 def commands abstract! end |
#default_command(name) ⇒ Object
Gives you the name of the current command in the current context
119 120 121 |
# File 'lib/gli/commands/doc.rb', line 119 def default_command(name) abstract! end |
#end_command(name) ⇒ Object
Ends a command, and “pops” you back up one context
129 130 131 |
# File 'lib/gli/commands/doc.rb', line 129 def end_command(name) abstract! end |
#end_commands ⇒ Object
Called when all commands for the current context have been vended
104 105 106 |
# File 'lib/gli/commands/doc.rb', line 104 def end_commands abstract! end |
#end_options ⇒ Object
Called when all options for the current context have been vended
94 95 96 |
# File 'lib/gli/commands/doc.rb', line 94 def abstract! end |
#ending ⇒ Object
Called when processing has completed
69 70 71 |
# File 'lib/gli/commands/doc.rb', line 69 def ending abstract! end |
#flag(name, aliases, desc, long_desc, default_value, arg_name, must_match, type) ⇒ Object
Gives you a flag in the current context
109 110 111 |
# File 'lib/gli/commands/doc.rb', line 109 def flag(name,aliases,desc,long_desc,default_value,arg_name,must_match,type) abstract! end |
#options ⇒ Object
Called at the start of options for the current context
89 90 91 |
# File 'lib/gli/commands/doc.rb', line 89 def abstract! end |
#program_desc(desc) ⇒ Object
Gives you the program description
74 75 76 |
# File 'lib/gli/commands/doc.rb', line 74 def program_desc(desc) abstract! end |
#program_long_desc(desc) ⇒ Object
Gives you the program long description
79 80 81 |
# File 'lib/gli/commands/doc.rb', line 79 def program_long_desc(desc) abstract! end |
#switch(name, aliases, desc, long_desc, negatable) ⇒ Object
Gives you a switch in the current context
114 115 116 |
# File 'lib/gli/commands/doc.rb', line 114 def switch(name,aliases,desc,long_desc,negatable) abstract! end |
#version(version) ⇒ Object
Gives you the program version
84 85 86 |
# File 'lib/gli/commands/doc.rb', line 84 def version(version) abstract! end |