app/lib/margin_sweeper.rb
# Capture zero values, then delete from the main collection.
Capture zero values, then delete from the main collection.
Capture zero values then delete from the main collection .
def separate_zeros(collection)
    zeros = collection.select {|value, margin| value == 0 }
    collection.reject!{|value, margin| value == 0 }
    return [zeros, collection]
  end
def separate_zeros ( collection ) zeros = collection . select { | value , margin | value == 0 } collection . reject! { | value , margin | value == 0 } return [ zeros , collection ] end
Capture zero values, then delete from the main collection.
Capture zero values then delete from the main collection .
collection