module Gamefic::Scripting
An instance module that enables scripting.
Including ‘Gamefic::Scripting` also extends `Gamefic::Scriptable`.
Public Class Methods
Source
# File lib/gamefic/scripting.rb, line 38 def self.included other super other.extend Scriptable end
Calls superclass method
Public Instance Methods
Source
# 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
@param symbol [Symbol] @return [Array<Binding>]
Source
# File lib/gamefic/scripting.rb, line 27 def included_scripts self.class.included_scripts end
@return [Array<Module<Scriptable>>]