Class: AppleBot::CommandOption
- Inherits:
-
Struct
- Object
- Struct
- AppleBot::CommandOption
- Defined in:
- lib/applebot/commands.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#description ⇒ Object
Returns the value of attribute description.
-
#key ⇒ Object
Returns the value of attribute key.
-
#required ⇒ Object
Returns the value of attribute required.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default
62 63 64 |
# File 'lib/applebot/commands.rb', line 62 def default @default end |
#description ⇒ Object
Returns the value of attribute description
62 63 64 |
# File 'lib/applebot/commands.rb', line 62 def description @description end |
#key ⇒ Object
Returns the value of attribute key
62 63 64 |
# File 'lib/applebot/commands.rb', line 62 def key @key end |
#required ⇒ Object
Returns the value of attribute required
62 63 64 |
# File 'lib/applebot/commands.rb', line 62 def required @required end |
#values ⇒ Object
Returns the value of attribute values
62 63 64 |
# File 'lib/applebot/commands.rb', line 62 def values @values end |
Instance Method Details
#cli_description ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/applebot/commands.rb', line 63 def cli_description s = "" s << "REQUIRED " if required s << "#{description}" s.tap do |d| d << " - VALUES: #{values}" if values d << " - DEFAULT: #{default}" if default end end |