Class: Gamefic::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/gamefic/callback.rb

Instance Method Summary collapse

Constructor Details

#initialize(narrative, code) ⇒ Callback

Returns a new instance of Callback.

Parameters:



7
8
9
10
# File 'lib/gamefic/callback.rb', line 7

def initialize narrative, code
  @narrative = narrative
  @code = code
end

Instance Method Details

#run(*args) ⇒ Object



12
13
14
# File 'lib/gamefic/callback.rb', line 12

def run *args
  Stage.run @narrative, *args, &@code
end