We have redirected you to our new domain: store.godotengine.org. Please update your bookmarks!

Description
Changelog
Reviews

ReDScribe: Ruby-embedded DSL for Godot.

Let’s re-describe your code as your own friendly domain-specific language.

Features

  • πŸ’Ž Execution: You can execute mruby code (a lightweight Ruby) in Godot and emit signals from mruby to Godot.
  • ✏️ Editing: You can write and edit Ruby files in the Godot Editor.
  • ⬛ REPL: You can try out Ruby interactively in Godot.

Usage

extends Node

@onready var res := ReDScribe.new()

func _ready() -> void:
    res.method_missing.connect(_method_missing)
    res.channel.connect(_subscribe)
    res.perform("""

        Alice says: "Hello Ruby! ❀️"

        puts "Welcome to the world of Ruby v#{RUBY_VERSION}, powered by #{RUBY_ENGINE} πŸ’Ž"

        Godot.emit_signal :spawn, { name: 'Alice', job: 'wizard', level: 1 }

    """)

func _method_missing(method_name: String, args: Array) -> void:
    print_debug('[method_missing] ', method_name, ': ', args)

func _subscribe(key: StringName, payload: Variant) -> void:
    print_debug('[subscribe] ', key, ': ', payload)


# -- Output --
#
#   [method_missing] Alice: [{ &"says": "Hello Ruby! ❀️" }]
#
#   Welcome to the world of Ruby v4.0, powered by mruby πŸ’Ž
#
#   [subscribe] spawn: { &"name": "Alice", &"job": "wizard", &"level": 1 }
#

ReDScribe Class Definitions

  • Properties
    • String boot_file
    • String exception
  • Methods
    • void set_boot_file(path: String)
    • void perform(dsl: String)
  • Signals
    • channel(key: StringName, payload: Variant)
    • method_missing(method_name: String, args: Array)

Documentation

English : https://tkmfujise.github.io/redscribe-docs

ζ—₯本θͺž : https://tkmfujise.github.io/redscribe-docs/ja

Changelog for version v0.2.0

No changelog provided for this version.

Reviews (0)

ReDScribe has no reviews yet.

Login to write a review.