Class Trollop::Option
In: lib/trollop.rb
Parent: Object

Methods

Attributes

default  [RW] 
long  [RW] 
multi_given  [W] 
name  [RW] 
short  [RW] 

Public Class methods

Determines which type of object to create based on arguments passed to +Trollop::opt+. This is trickier in Trollop, than other cmdline parsers (e.g. Slop) because we allow the +default:+ to be able to set the option‘s type.

Provide a way to register symbol aliases to the Parser

Public Instance methods

note: Option-Types with both multi_arg? and flag? false are single-parameter (normal) options.

Format the educate-line description including the default-value(s)

Indicates a flag option, which is an option without an argument

multi?()

Alias for multi

Indicates that this is a multivalued (Array type) argument

provide type-format string. default to empty, but user should probably override it

[Validate]