Methods
power_set
to_console
to_shell
to_shellwords
Public Instance methods
[ + ]
# File lib/lore/facets/set.rb, line 16 def power_set if empty? [self] else subset = dup value = [ subset.pop ] subsubs = subset.power_set subsubs.concat( subsubs.map{ |subset| subset + value } ) end end
Alias for to_shell
This method is also aliased as
to_console
[ + ]
# File lib/lore/facets/shellwords.rb, line 50 def to_shell to_shellwords.join(' ') end
Convert an array into command line parameters. The array is accepted in the format of Ruby method arguments —ie. [arg1, arg2, …, hash]
[ + ]
# File lib/lore/facets/shellwords.rb, line 44 def to_shellwords flags = (Hash===last ? pop : {}) flags = flags.to_shellwords flags + ' ' + self #join(" ") end