Class: Ruff::Throws::Resend

Inherits:
Object
  • Object
show all
Defined in:
lib/ruff/objects.rb

Overview

Resend is internal object like Eff.

It is used when an effect is unable to be handled and should be thrown to the outer handler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(eff, k) ⇒ Resend

creates a new object with eff and k.



33
34
35
36
# File 'lib/ruff/objects.rb', line 33

def initialize(eff, k)
  @eff = eff
  @k = k
end

Instance Attribute Details

#effObject (readonly)

is abstracted effect (such as Eff or (re)thrown Resend).



27
28
29
# File 'lib/ruff/objects.rb', line 27

def eff
  @eff
end

#kObject (readonly)

is a continuation of eff thrown context.



30
31
32
# File 'lib/ruff/objects.rb', line 30

def k
  @k
end