Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2014 03:41
Show Gist options
  • Save anonymous/29f4e689aa24707ff411 to your computer and use it in GitHub Desktop.
Save anonymous/29f4e689aa24707ff411 to your computer and use it in GitHub Desktop.
records = (0..316).to_a
records_count = records.size
num_records_to_display = 100
display_records = [ ]
records.each_with_index |record, index|
if ....
display_records << record
end
end
display_records.size #=> 100 (num_records_to_display)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment