{"id":19773064,"url":"https://github.com/r-unic/rogems","last_synced_at":"2025-04-30T18:31:27.318Z","repository":{"id":65385369,"uuid":"590980622","full_name":"R-unic/RoGems","owner":"R-unic","description":"A Ruby to Lua transpiler written in pure Ruby for use in the Roblox game engine","archived":false,"fork":false,"pushed_at":"2023-05-08T05:43:57.000Z","size":4691,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-08T13:54:34.033Z","etag":null,"topics":["compiler","game","lua","roblox","roblox-ruby","rogems","ruby","transpiler"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/rogems","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/R-unic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-19T16:56:35.000Z","updated_at":"2024-04-17T14:27:31.000Z","dependencies_parsed_at":"2023-02-18T23:01:49.854Z","dependency_job_id":null,"html_url":"https://github.com/R-unic/RoGems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2FRoGems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2FRoGems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2FRoGems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2FRoGems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R-unic","download_url":"https://codeload.github.com/R-unic/RoGems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223811839,"owners_count":17206933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","game","lua","roblox","roblox-ruby","rogems","ruby","transpiler"],"created_at":"2024-11-12T05:08:32.224Z","updated_at":"2024-11-12T05:08:32.982Z","avatar_url":"https://github.com/R-unic.png","language":"Ruby","readme":"\u003ca href=\"https://github.com/R-unic/RoGems/tree/master/spec\"\u003e\r\n  \u003cimg src=\"https://github.com/R-unic/RoGems/actions/workflows/main.yml/badge.svg\" alt=\"build_ci\"\u003e\r\n\u003c/a\u003e\r\n\u003ca href=\"https://badge.fury.io/rb/rogems\"\u003e\r\n  \u003cimg src=\"https://badge.fury.io/rb/rogems.svg\" alt=\"Gem Version\"\u003e\r\n\u003c/a\u003e\r\n\r\n# RoGems\r\nRoGems is a Ruby to Lua transpiler written for use with Roblox (like roblox-ts)\r\nIt is **unfinished**.\r\n\r\n## Examples\r\nSee \u003ca href=\"https://github.com/R-unic/RoGems/tree/master/examples\"\u003eexamples\u003c/a\u003e for more\r\n\r\n### Lava Bricks\r\nRuby Source\r\n```rb\r\ncollection = game.GetService(\"CollectionService\")\r\nlava_bricks = collection.GetTagged(\"Lava\")\r\n\r\nlava_bricks.each do |lava|\r\n    lava.Touched.Connect do |hit|\r\n        parent = hit.Parent\r\n        humanoid = parent.FindFirstChildOfClass(\"Humanoid\")\r\n        if !humanoid.nil? then\r\n            humanoid.TakeDamage(humanoid.Health)\r\n        end\r\n    end\r\nend\r\n```\r\n\r\nLua Output\r\n```lua\r\nlocal ruby = require(game.ReplicatedStorage.Ruby.Runtime)\r\n\r\nlocal collection = game:GetService(\"CollectionService\")\r\nlocal lava_bricks = collection:GetTagged(\"Lava\")\r\nfor lava in ruby.list(lava_bricks) do\r\n    (type(lava.Touched) == \"function\" and lava:Touched() or lava.Touched):Connect(function(hit)\r\n        local parent = (type(hit.Parent) == \"function\" and hit:Parent() or hit.Parent)\r\n        local humanoid = parent:FindFirstChildOfClass(\"Humanoid\")\r\n        if humanoid == nil then\r\n            humanoid:TakeDamage((type(humanoid.Health) == \"function\" and humanoid:Health() or humanoid.Health))\r\n        end\r\n    end)\r\nend\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Frogems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-unic%2Frogems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Frogems/lists"}