module Gamefic::Scripting

def self.included other

def self.included other
  super
  other.extend Scriptable
end

def find_and_bind(symbol)

Returns:
  • (Array) -

Parameters:
  • symbol (Symbol) --
def find_and_bind(symbol)
  included_scripts.flat_map { |script| script.send(symbol) }
                  .map { |blk| Binding.new(self, blk) }
end

def included_scripts

Returns:
  • (Array>) -
def included_scripts
  self.class.included_scripts
end