Module: Gamefic::Scripting::Hooks

Included in:
Gamefic::Scripting
Defined in:
lib/gamefic/scripting/hooks.rb

Overview

Scripting hook methods are instance methods that return callbacks for execution in the context of a scriptable module or narrative. They collect the procs defined in Scriptable hook methods and bind them to the instance for execution.

Instance Method Summary collapse

Instance Method Details

#after_commandsArray<Binding>

Returns:



15
16
17
# File 'lib/gamefic/scripting/hooks.rb', line 15

def after_commands
  find_and_bind(:after_commands)
end

#before_commandsArray<Binding>

Returns:



10
11
12
# File 'lib/gamefic/scripting/hooks.rb', line 10

def before_commands
  find_and_bind(:before_commands)
end

#conclude_blocksArray<Binding>

Returns:



35
36
37
# File 'lib/gamefic/scripting/hooks.rb', line 35

def conclude_blocks
  find_and_bind(:conclude_blocks)
end

#player_conclude_blocksArray<Binding>

Returns:



40
41
42
# File 'lib/gamefic/scripting/hooks.rb', line 40

def player_conclude_blocks
  find_and_bind(:player_conclude_blocks)
end

#player_output_blocksArray<Binding>

Returns:



30
31
32
# File 'lib/gamefic/scripting/hooks.rb', line 30

def player_output_blocks
  find_and_bind(:player_output_blocks)
end

#ready_blocksArray<Binding>

Returns:



20
21
22
# File 'lib/gamefic/scripting/hooks.rb', line 20

def ready_blocks
  find_and_bind(:ready_blocks)
end

#update_blocksArray<Binding>

Returns:



25
26
27
# File 'lib/gamefic/scripting/hooks.rb', line 25

def update_blocks
  find_and_bind(:update_blocks)
end