{"id":22981006,"url":"https://github.com/rubyworks/iteration","last_synced_at":"2025-07-02T15:36:08.551Z","repository":{"id":2137123,"uuid":"3080838","full_name":"rubyworks/iteration","owner":"rubyworks","description":"unified iterator","archived":false,"fork":false,"pushed_at":"2013-03-09T03:42:16.000Z","size":140,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T21:45:33.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/iteration","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-31T21:10:03.000Z","updated_at":"2015-09-10T03:36:57.000Z","dependencies_parsed_at":"2022-08-20T23:10:14.467Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/iteration","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rubyworks/iteration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fiteration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fiteration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fiteration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fiteration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/iteration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fiteration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166715,"owners_count":23424225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T01:46:37.387Z","updated_at":"2025-07-02T15:36:08.531Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iteration\n\n[Website](http://rubyworks.github.com/iteration) /\n[Documentation](http://rubydoc.info/gems/iteration) /\n[Report Issue](http://github.com/rubyworks/iteration/issues) /\n[Development](http://github.com/rubyworks/iteration)\n\n[![Build Status](https://secure.travis-ci.org/rubyworks/iteration.png)](http://travis-ci.org/rubyworks/iteration)\n[![Gem Version](https://badge.fury.io/rb/iteration.png)](http://badge.fury.io/rb/iteration)\n\n\n## DESCRIPTION\n\nHave you ever wanted to know if an iteration was the last,\nor the first, or what iteration results came before the\ncurrent? Well, now you can! Iteration is a class that encapsulates\na step in an each loop. It can be used to query infromation about\nan iteration easily.\n\n\n## FEATURES\n\n* Query sate of each iteration.\n* Supports look-ahead features on Arrays.\n\n\n## SYNOPSIS\n\nIterate over each element of array using an iteration object.\n\n    [1,2,3].each_iteration do |it|\n      p it.index\n      p it.value\n      p it.first?\n      p it.last?\n      p it.prior\n      p it.after\n    end\n\non each successive iteration produces:\n\n    0          1          2\n    1          2          3\n    true       false      false\n    false      false      true\n    []         [1]        [1,2]\n    [2,3]      [3]        []\n\n\n## HOW TO INSTALL\n\nTo install with RubyGems simply open a console and type:\n\n    gem install iteration\n\nLocal installation requires Setup.rb (gem install setup),\nthen download the tarball package and type:\n\n    tar -xvzf iteration-1.0.0.tgz\n    cd iteration-1.0.0.tgz\n    sudo setup.rb all\n\nWindows users use 'ruby setup.rb all'.\n\n\n## COPYRIGHTS\n\nCopyright (c) 2009 Rubyworks\n\nThis program is ditributed unser the terms of the *BSD-2-Clause* license.\n\nSee LICENSE.txt file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fiteration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Fiteration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fiteration/lists"}