Class: Ruff::Throws::Eff

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

Overview

Eff is internal object.

They make effects encapsulate with ID and arguments to be sent to the handler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, args) ⇒ Eff

creates a new object with id and args.



16
17
18
19
# File 'lib/ruff/objects.rb', line 16

def initialize(id, args)
  @id = id
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

passes to a handler which can catch the effect.



13
14
15
# File 'lib/ruff/objects.rb', line 13

def args
  @args
end

#idObject (readonly)

makes the object unique.



10
11
12
# File 'lib/ruff/objects.rb', line 10

def id
  @id
end