{"id":19187953,"url":"https://github.com/fraktality/sloop","last_synced_at":"2025-08-26T15:15:22.469Z","repository":{"id":79226444,"uuid":"74502887","full_name":"Fraktality/Sloop","owner":"Fraktality","description":"Feature-complete OOP","archived":false,"fork":false,"pushed_at":"2017-04-30T20:14:05.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T05:52:50.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Fraktality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-22T18:44:23.000Z","updated_at":"2021-01-05T05:23:24.000Z","dependencies_parsed_at":"2023-06-01T17:30:44.815Z","dependency_job_id":null,"html_url":"https://github.com/Fraktality/Sloop","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/Fraktality%2FSloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraktality%2FSloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraktality%2FSloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fraktality%2FSloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fraktality","download_url":"https://codeload.github.com/Fraktality/Sloop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240265091,"owners_count":19774068,"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":[],"created_at":"2024-11-09T11:22:20.973Z","updated_at":"2025-02-23T03:26:37.652Z","avatar_url":"https://github.com/Fraktality.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sloop\nSimple and fast OOP model for Lua.\n\n## Usage\n\nSpecify class members by enclosing them in curly braces:\n\n```lua\nlocal Person = Class{\n\tSay = function(self, phrase)\n\t\tprint(self.name .. ':', phrase)\n\tend;\n}\n```\n\nInstantiate a class instance by calling the class:\n\n```lua\nPerson():Say('Hello, world!')\n```\n\nSpecify parent classes by enclosing them in parenthesis before the class body:\n\n```lua\nlocal PersonWhoEatsBagels = Class(Person, BagelEater){}\n```\n\nName a method `Init` to make it a constructor:\n\n```lua\nlocal PersonWhoEatsBagels = Class(Person, BagelEater){ -- Inherits from Person \u0026 BagelEater\n\tInit = function(self, name, bagelCount)\n\t\trawset(self, 'name', name)\n\t\trawset(self, 'bagelCount', bagelCount)\n\tend;\n}\n```\n\nTag methods are detected and handled automatically:\n\n```lua\nlocal Number = Class{\n\tInit = function(value)\n\t\tself.value = value\n\tend;\n\t__add = function(op0, op1)\n\t\treturn op0.value + op1.value\n\tend;\n\t__tostring = function(self)\n\t\treturn tostring(self.value)\n\tend;\n}\n\nprint(Number(1) + Number(2)) --\u003e 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraktality%2Fsloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraktality%2Fsloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraktality%2Fsloop/lists"}