Class: Clip::Flag

Inherits:
Object
  • Object
show all
Defined in:
lib/clip.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(short, long, options) ⇒ Flag

nodoc



392
393
394
395
396
# File 'lib/clip.rb', line 392

def initialize(short, long, options)
  @short = short
  @long = long
  @description = options[:desc]
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



388
389
390
# File 'lib/clip.rb', line 388

def description
  @description
end

#longObject

Returns the value of attribute long.



388
389
390
# File 'lib/clip.rb', line 388

def long
  @long
end

#shortObject

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

Returns:

  • (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

Returns:

  • (Boolean)


402
403
404
# File 'lib/clip.rb', line 402

def required?
  false
end