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:



17
18
19
# File 'lib/gamefic/scripting/hooks.rb', line 17

def after_commands
  find_and_bind(:after_commands)
end

#before_commandsArray<Binding>

Returns:



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

def before_commands
  find_and_bind(:before_commands)
end

#conclude_blocksArray<Binding>

Returns:



37
38
39
# File 'lib/gamefic/scripting/hooks.rb', line 37

def conclude_blocks
  find_and_bind(:conclude_blocks)
end

#player_conclude_blocksArray<Binding>

Returns:



42
43
44
# File 'lib/gamefic/scripting/hooks.rb', line 42

def player_conclude_blocks
  find_and_bind(:player_conclude_blocks)
end

#player_output_blocksArray<Binding>

Returns:



32
33
34
# File 'lib/gamefic/scripting/hooks.rb', line 32

def player_output_blocks
  find_and_bind(:player_output_blocks)
end

#ready_blocksArray<Binding>

Returns:



22
23
24
# File 'lib/gamefic/scripting/hooks.rb', line 22

def ready_blocks
  find_and_bind(:ready_blocks)
end

#update_blocksArray<Binding>

Returns:



27
28
29
# File 'lib/gamefic/scripting/hooks.rb', line 27

def update_blocks
  find_and_bind(:update_blocks)
end