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
387 388 389 390 391 |
# File 'lib/clip.rb', line 387 def initialize(short, long, ) @short = short @long = long @description = [:desc] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
383 384 385 |
# File 'lib/clip.rb', line 383 def description @description end |
#long ⇒ Object
Returns the value of attribute long.
383 384 385 |
# File 'lib/clip.rb', line 383 def long @long end |
#short ⇒ Object
Returns the value of attribute short.
383 384 385 |
# File 'lib/clip.rb', line 383 def short @short end |
Instance Method Details
#has_default? ⇒ Boolean
401 402 403 |
# File 'lib/clip.rb', line 401 def has_default? false end |
#process(parser, value) ⇒ Object
393 394 395 |
# File 'lib/clip.rb', line 393 def process(parser, value) parser.send("flag_#{@long}".to_sym) end |
#required? ⇒ Boolean
397 398 399 |
# File 'lib/clip.rb', line 397 def required? false end |