Class: Dry::Struct::Compiler

Inherits:
Types::Compiler
  • Object
show all
Defined in:
lib/dry/struct/compiler.rb

Direct Known Subclasses

StructBuilder

Instance Method Summary collapse

Instance Method Details

#visit_struct(node) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dry/struct/compiler.rb', line 6

def visit_struct(node)
  struct, _ = node

  struct.__getobj__
rescue ::WeakRef::RefError
  if struct.weakref_alive?
    raise
  else
    raise RecycledStructError
  end
end