Class: Weft::Params::Thunk Private

Inherits:
Object
  • Object
show all
Defined in:
lib/weft/params.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A registered-not-yet-run derivation. Immutable, so branch copies may share it: forcing replaces the entry in the forcing bag only, which is what gives copy-on-branch memoization its semantics.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ Thunk

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Thunk.



33
34
35
# File 'lib/weft/params.rb', line 33

def initialize(block)
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/weft/params.rb', line 31

def block
  @block
end