Class: ValueHolder
Overview
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.
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ ValueHolder
constructor
A new instance of ValueHolder.
- #restore_snapshot(value) ⇒ Object
- #take_snapshot ⇒ Object
Constructor Details
#initialize(value = nil) ⇒ ValueHolder
Returns a new instance of ValueHolder.
109 110 111 |
# File 'lib/mega/snapshot.rb', line 109 def initialize(value=nil) @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
107 108 109 |
# File 'lib/mega/snapshot.rb', line 107 def value @value end |