Implements a value holder. In Wee this is useful for backtracking the reference assigned to an instance variable (not the object itself!). An example where this is used is the @__decoration attribute of class Wee::Component.
Methods
Attributes
[RW] | value |
Public Class methods
[ show source ]
# File lib/facets/more/snapshot.rb, line 102 def initialize(value=nil) @value = value end
Public Instance methods
[ show source ]
# File lib/facets/more/snapshot.rb, line 110 def restore_snapshot(value) @value = value end
[ show source ]
# File lib/facets/more/snapshot.rb, line 106 def take_snapshot @value end