Class: OptparseLite::DescriptionAndOpts

Inherits:
Array
  • Object
show all
Defined in:
lib/optparse-lite.rb

Instance Method Summary collapse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


279
280
281
# File 'lib/optparse-lite.rb', line 279

def any?
  detect{|x| x.respond_to?(:to_str)}
end

#first_desc_lineObject



282
283
284
285
286
287
288
289
# File 'lib/optparse-lite.rb', line 282

def first_desc_line
  resp = nil
  each do |x|
    resp = x.kind_of?(String) ? x : x.first_desc_line
    break if resp
  end
  resp
end