Class: Smith::Workflow::SplitStepPersistence::TransitionContractFreezer
- Inherits:
-
Object
- Object
- Smith::Workflow::SplitStepPersistence::TransitionContractFreezer
- Extended by:
- Dry::Initializer
- Defined in:
- lib/smith/workflow/split_step_persistence/transition_contract_freezer.rb
Constant Summary collapse
- CORE_FREEZE =
Object.instance_method(:freeze)
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/smith/workflow/split_step_persistence/transition_contract_freezer.rb', line 17 def call stack = [[value, 0]] seen = {}.compare_by_identity nodes = 0 until stack.empty? item, depth = stack.pop nodes = visit!(nodes, depth) freeze_item(item, depth, stack, seen) end value end |