Class: Array
Instance Method Summary collapse
Instance Method Details
#each_with_expansion(&b) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/lsl/command/execution.rb', line 2 def each_with_expansion(&b) return if empty? first.array_aware_each do |x| if size == 1 yield([x]) else self[1..-1].each_with_expansion do |args| yield([x] + args) end end end end |