Class: CLI::Options
Instance Method Summary
collapse
Methods inherited from Switches
#<<, #find, #find_long, #find_short, #has_long?, #has_short?, #initialize, is_switch?
Constructor Details
This class inherits a constructor from CLI::Switches
Instance Method Details
#mandatory ⇒ Object
4
5
6
|
# File 'lib/cli/options.rb', line 4
def mandatory
select{|o| o.mandatory?}
end
|
#multiary ⇒ Object
16
17
18
|
# File 'lib/cli/options.rb', line 16
def multiary
select{|a| a.multiary?}
end
|
#optional ⇒ Object
8
9
10
|
# File 'lib/cli/options.rb', line 8
def optional
select{|o| not o.mandatory?}
end
|
#unarry ⇒ Object
12
13
14
|
# File 'lib/cli/options.rb', line 12
def unarry
select{|a| not a.multiary?}
end
|