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.