Module: Gamefic::Scripting
- Extended by:
- Scriptable
- Included in:
- Narrative
- Defined in:
- lib/gamefic/scripting.rb,
lib/gamefic/scripting/hooks.rb,
lib/gamefic/scripting/seeds.rb,
lib/gamefic/scripting/scenes.rb,
lib/gamefic/scripting/proxies.rb,
lib/gamefic/scripting/entities.rb,
lib/gamefic/scripting/syntaxes.rb,
lib/gamefic/scripting/responses.rb more...
Overview
An instance module that enables scripting.
Including ‘Gamefic::Scripting` also extends `Gamefic::Scriptable`.
Defined Under Namespace
Modules: Entities, Hooks, Proxies, Responses, Scenes, Seeds, Syntaxes
Instance Attribute Summary
Attributes included from Gamefic::Scriptable::Scenes
#default_conclusion, #default_scene
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Scriptable
Methods included from Gamefic::Scriptable::Syntaxes
Methods included from Gamefic::Scriptable::Seeds
#construct, #make, #seed, #seeds
Methods included from Gamefic::Scriptable::Scenes
#active_choice, #block, #conclusion, #introduction, #introductions, #multiple_choice, #named_scenes, #pause, #scene_classes, #scene_classes_map, #scenes, #select_default_conclusion, #select_default_scene, #yes_or_no
Methods included from Gamefic::Scriptable::Responses
#meta, #respond, #responses, #responses_for, #verbs
Methods included from Gamefic::Scriptable::Queries
#available, #children, #descendants, #extended, #global, #integer, #myself, #parent, #plaintext, #siblings
Methods included from Gamefic::Scriptable::Hooks
#after_command, #after_commands, #before_command, #before_commands, #conclude_blocks, #on_conclude, #on_player_conclude, #on_player_output, #on_player_ready, #on_player_update, #on_ready, #on_update, #player_conclude_blocks, #player_output_blocks, #ready_blocks, #update_blocks
Methods included from Syntaxes
Methods included from Scenes
#default_conclusion, #default_scene, #introductions, #named_scenes, #prepare, #scene_class, #scenes
Methods included from Seeds
Methods included from Responses
Methods included from Hooks
#after_commands, #before_commands, #conclude_blocks, #player_conclude_blocks, #player_output_blocks, #ready_blocks, #update_blocks
Methods included from Entities
#destroy, #entities, #find, #make, #pick, #pick!, #players
Methods included from Proxies
Class Method Details
permalink .included(other) ⇒ Object
[View source]
38 39 40 41 |
# File 'lib/gamefic/scripting.rb', line 38 def self.included other super other.extend Scriptable end |
Instance Method Details
permalink #find_and_bind(symbol) ⇒ Array<Binding>
33 34 35 36 |
# File 'lib/gamefic/scripting.rb', line 33 def find_and_bind(symbol) included_scripts.flat_map { |script| script.send(symbol) } .map { |blk| Binding.new(self, blk) } end |
permalink #included_scripts ⇒ Array<Module<Scriptable>>
27 28 29 |
# File 'lib/gamefic/scripting.rb', line 27 def included_scripts self.class.included_scripts end |