Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

How to loop through versions? #97

@nozpheratu

Description

@nozpheratu

I wasn't sure how to go about doing this, initialy I had some code to the effect of this:

foo.version.downto(1) do |version|
  foo.revert_to(version)
  puts foo.version
end  

But I was wondering if there was a direct way of doing it? Doing it this way pollutes foo's scope, so if I wanted to use the most up-to-date foo after the loop finishes executing I have to reload it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions