Class Snapshot::ValueHolder
In: lib/more/facets/snapshot.rb
Parent: Object

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

value  [RW] 

Public Class methods

[Source]

# File lib/more/facets/snapshot.rb, line 140
  def initialize(value=nil)
    @value = value
  end

Public Instance methods

[Source]

# File lib/more/facets/snapshot.rb, line 148
  def restore_snapshot(value)
    @value = value
  end

[Source]

# File lib/more/facets/snapshot.rb, line 144
  def take_snapshot
    @value
  end

[Validate]