# File lib/facets/standard/facets/set.rb, line 20 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
# File lib/facets/standard/facets/shellwords.rb, line 78 def shelljoin Shellwords.shelljoin(shellwords) 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/facets/standard/facets/shellwords.rb, line 71 def shellwords opts, args = *flatten.partition{ |e| Hash === e } opts = opts.inject({}){ |m,h| m.update(h); m } opts.shellwords + args end
Generated with the Darkfish Rdoc Generator 2.