| In: |
lib/Borges/Utilities/StateHolder.rb
|
| Parent: | Object |
A Borges::StateHolder backtracks itself, restoring previous versions of the object it holds when a user uses the back button. The StateHolder does not backtrack the object it holds.
For example:
obj = 5 st = Borges::StateHolder.new obj # page is rendered, user causes this action to take place: st.contents = 7 # user goes back to the first page puts st.contents # => 5
| contents | [RW] | The object the StateHolder should backtrack. |