class Header
Represents a header row in usage output.
Headers display command names and their descriptions.
Definitions
def initialize(name, object)
Initialize a new header.
Signature
-
parameter
name
String
The command name.
-
parameter
object
Command
The command class.
Implementation
def initialize(name, object)
@name = name
@object = object
end
attr :name
The command name.
Signature
-
attribute
String
attr :object
The command class.
Signature
-
attribute
Command
def align(columns)
Generate an aligned header string.
Signature
-
parameter
columns
Columns
The columns for alignment (unused for headers).
-
returns
String
The command line usage string.
Implementation
def align(columns)
@object.command_line(@name)
end