Class: Main::Parameter::Option

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

Overview

slight alteration to the default synopsis

Instance Method Summary collapse

Instance Method Details

#short_synopsisObject



54
55
56
57
58
59
# File 'lib/rabal/util.rb', line 54

def short_synopsis
    long, *short = names
    value = cast || name 
    rhs = argument ? (argument == :required ? "=#{ name }" : "=[#{ name }]") : nil 
    label = ["--#{ long }#{ rhs }", short.map{|s| "-#{ s }"}].flatten.join(", ")
end