module Gamefic::Scriptable::Responses

def respond verb, *args, &proc

Returns:
  • (Response) -

Other tags:
    Yieldparam: -

Parameters:
  • args (Array) -- Filters for the command's tokens
  • verb (Symbol, String, nil) -- An imperative verb for the command

  • Other tags:
      Example: A Response that accepts a Character -
      Example: A simple Response. -
    def respond verb, *args, &proc
      response = Response.new(verb&.to_sym, *args, &proc)
      responses.push response
      syntaxes.push response.syntax
      response
    end