• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Yonaba/30log: 30 lines library for object orientation in Lua

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Yonaba/30log

开源软件地址(OpenSource Url):

https://github.com/Yonaba/30log

开源编程语言(OpenSource Language):

Lua 94.8%

开源软件介绍(OpenSource Introduction):

30log logo

Join the chat at https://gitter.im/Yonaba/30log Build Status Lua License Coverage Status

30log, in extenso 30 Lines Of Goodness is a minified framework for object-orientation in Lua. It provides named and unnamed classes, single inheritance, metamethods and a basic support for mixins. In 30 lines.
Well, somehow.

Download

Archive

Current release is 1.3.0. See other releases.

Bash

This will clone the repository, as-is, and deliver the cutting edge release. Might be unstable.

git clone git://github.com/Yonaba/30log.git

LuaRocks

This will download and install the latest stable release from Luarocks servers.

luarocks install 30log

Wiki

A full documentation is available on the wiki. Find the project page at yonaba.github.io/30log.

Class-Commons support

Class-Commons is an interface which provides a common API for a wide range of Object Orientation libraries in Lua. There is a small plugin, originally written by TsT which provides compatibility between 30log and Class-commons.
See the module 30log-commons.lua.

Specs

You can run the included specs with Telescope using the following command from Lua from the root foolder:

lua tsc -f specs/*

About the source

30log-clean.lua

30log was initially designed for minimalistic purposes. But then commit after commit, I came up with a source code that was obviously surpassing 30 lines. As I wanted to stick to the "30-lines" rule that defines the name of this library, I had to use an ugly syntax which not much elegant, yet 100 % functional.
For those who might be interested though, the file 30log-clean.lua contains the full source code, properly formatted and well indented for your perusal.

30log-global.lua

The file 30log-global.lua features the exact same source as the original 30log.lua, excepts that it sets a global named class. This is convenient for Lua-based frameworks such as Codea.

30log-singleton.lua

The file 30log-singleton.lua is a singleton pattern implementation for use with 30log.

Contributors

License

This work is MIT-Licensed.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
gityf/ngx_lua_thrift: thrift lua for nginx.发布时间:2022-08-16
下一篇:
haproxytech/haproxy-lua-cors: Lua library for enabling CORS in HAProxy发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap