Class: GLI::Argument
- Inherits:
-
Object
- Object
- GLI::Argument
- Defined in:
- lib/gli/argument.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = []) ⇒ Argument
constructor
A new instance of Argument.
- #multiple? ⇒ Boolean
- #optional? ⇒ Boolean
Constructor Details
#initialize(name, options = []) ⇒ Argument
Returns a new instance of Argument.
7 8 9 10 |
# File 'lib/gli/argument.rb', line 7 def initialize(name, = []) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/gli/argument.rb', line 4 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/gli/argument.rb', line 5 def @options end |
Instance Method Details
#multiple? ⇒ Boolean
16 17 18 |
# File 'lib/gli/argument.rb', line 16 def multiple? @options.include? :multiple end |
#optional? ⇒ Boolean
12 13 14 |
# File 'lib/gli/argument.rb', line 12 def optional? @options.include? :optional end |