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

How to loop through versions? #97

Open
nozpheratu opened this issue Jun 14, 2013 · 0 comments
Open

How to loop through versions? #97

nozpheratu opened this issue Jun 14, 2013 · 0 comments

Comments

@nozpheratu
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant