Class: Como::MainOpt
- Inherits:
-
Opt
- Object
- ComoCommon
- Opt
- Como::MainOpt
- Defined in:
- lib/como.rb
Overview
Specialized Opt class for program (i.e. highest level subcommand).
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Program author and year (date).
-
#external ⇒ Object
Program external arguments:.
-
#year ⇒ Object
readonly
Program author and year (date).
Attributes inherited from Opt
#config, #doc, #given, #longOpt, #name, #parent, #rules, #shortOpt, #subcmd, #subopt, #type, #value
Instance Method Summary collapse
-
#fullCommand ⇒ Object
Full command name.
-
#initialize(author, year, name, opt, type, doc, value = nil) ⇒ MainOpt
constructor
A new instance of MainOpt.
-
#usageCommand ⇒ Object
Usage printout for command.
-
#usageCommandOld ⇒ Object
Usage printout for command.
Methods inherited from Opt
#[], [], addOpt, #apply, #applyConfig, #argById, #argByName, author, #check, #checkAlso, #checkMissing, #checkRule, #cmdline, configOverlay, current, default, #default, defaultOpt, each, #each, #each_given, each_given, #error, external, #findOpt, findOpt, full, #givenCount, #givenSubcmd, #hasArg, #hasMany, #isExclusive, #isRequired, #isSwitch, main, #opt, #params, #parse, progname, reset, setMain, #setRuleCheck, setSubcmd, #setSubopt, #setUsageFooter, #setUsageHeader, #silent?, #suball, subcmd, #suboptDoc, #usage, #usageIfHelp, #usageNormal, #usageNormalOld, year, #~
Methods inherited from ComoCommon
Constructor Details
#initialize(author, year, name, opt, type, doc, value = nil) ⇒ MainOpt
Returns a new instance of MainOpt.
1758 1759 1760 1761 1762 1763 1764 1765 |
# File 'lib/como.rb', line 1758 def initialize( , year, name, opt, type, doc, value = nil ) @author = @year = year @external = nil super( name, opt, type, doc, value = nil ) end |
Instance Attribute Details
#author ⇒ Object (readonly)
Program author and year (date).
1755 1756 1757 |
# File 'lib/como.rb', line 1755 def @author end |
#external ⇒ Object
Program external arguments:
1752 1753 1754 |
# File 'lib/como.rb', line 1752 def external @external end |
#year ⇒ Object (readonly)
Program author and year (date).
1755 1756 1757 |
# File 'lib/como.rb', line 1755 def year @year end |
Instance Method Details
#fullCommand ⇒ Object
Full command name.
1769 1770 1771 |
# File 'lib/como.rb', line 1769 def fullCommand Opt.progname end |