class Array

Public Instance Methods

each_with_expansion() { |x| ... } click to toggle source
# 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
flat_all_nil?() click to toggle source
# File lib/lsl/ext/ext.rb, line 36
def flat_all_nil?
  flatten.select { |x| x }.empty?
end