Class: Clip::Flag
- Inherits:
-
Object
- Object
- Clip::Flag
- Defined in:
- lib/clip.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#long ⇒ Object
Returns the value of attribute long.
-
#short ⇒ Object
Returns the value of attribute short.
Instance Method Summary collapse
- #has_default? ⇒ Boolean
-
#initialize(short, long, options) ⇒ Flag
constructor
nodoc.
- #process(parser, value) ⇒ Object
- #required? ⇒ Boolean
Constructor Details
#initialize(short, long, options) ⇒ Flag
nodoc
392 393 394 395 396 |
# File 'lib/clip.rb', line 392 def initialize(short, long, ) @short = short @long = long @description = [:desc] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
388 389 390 |
# File 'lib/clip.rb', line 388 def description @description end |
#long ⇒ Object
Returns the value of attribute long.
388 389 390 |
# File 'lib/clip.rb', line 388 def long @long end |
#short ⇒ Object
Returns the value of attribute short.
388 389 390 |
# File 'lib/clip.rb', line 388 def short @short end |
Instance Method Details
#has_default? ⇒ Boolean
406 407 408 |
# File 'lib/clip.rb', line 406 def has_default? false end |
#process(parser, value) ⇒ Object
398 399 400 |
# File 'lib/clip.rb', line 398 def process(parser, value) parser.send("flag_#{@long}".to_sym) end |
#required? ⇒ Boolean
402 403 404 |
# File 'lib/clip.rb', line 402 def required? false end |