Class: Cmdline::Argument
- Inherits:
-
Struct
- Object
- Struct
- Cmdline::Argument
- Defined in:
- lib/cmdline.rb,
lib/cmdline.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#trailing ⇒ Object
Returns the value of attribute trailing.
-
#trailing_values ⇒ Object
Returns the value of attribute trailing_values.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize ⇒ Argument
constructor
A new instance of Argument.
Constructor Details
#initialize ⇒ Argument
Returns a new instance of Argument.
56 57 58 59 60 61 62 63 |
# File 'lib/cmdline.rb', line 56 def initialize(*) super self.name ||= "" self.description ||= "" self.trailing ||= false self.value ||= "" self.trailing_values ||= [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
46 47 48 |
# File 'lib/cmdline.rb', line 46 def description @description end |
#name ⇒ Object
Returns the value of attribute name
46 47 48 |
# File 'lib/cmdline.rb', line 46 def name @name end |
#trailing ⇒ Object
Returns the value of attribute trailing
46 47 48 |
# File 'lib/cmdline.rb', line 46 def trailing @trailing end |
#trailing_values ⇒ Object
Returns the value of attribute trailing_values
46 47 48 |
# File 'lib/cmdline.rb', line 46 def trailing_values @trailing_values end |
#value ⇒ Object
Returns the value of attribute value
46 47 48 |
# File 'lib/cmdline.rb', line 46 def value @value end |