Class: CLI::Options

Inherits:
Switches show all
Defined in:
lib/cli/options.rb

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

#mandatoryObject



4
5
6
# File 'lib/cli/options.rb', line 4

def mandatory
	select{|o| o.mandatory?}
end

#multiaryObject



16
17
18
# File 'lib/cli/options.rb', line 16

def multiary
	select{|a| a.multiary?}
end

#optionalObject



8
9
10
# File 'lib/cli/options.rb', line 8

def optional
	select{|o| not o.mandatory?}
end

#unarryObject



12
13
14
# File 'lib/cli/options.rb', line 12

def unarry
	select{|a| not a.multiary?}
end