简体   繁体   English

如何构建Ruby插件?

[英]How to structure a ruby plugin?

I want to write an open source plugin, but I have no idea about the structure of it. 我想写一个开源插件,但是我对它的结构一无所知。 I read some plugins code on github but sometimes they are hard to understand for me (I'm new to ruby). 我在github上阅读了一些插件代码,但有时对我来说很难理解(我是ruby的新手)。

Can somebody advise me some links to simple plugins, books, tutorials or anything else to teach me how I can write a well-formed ruby plugin? 有人可以建议我一些指向简单插件,书籍,教程或其他内容的链接来教我如何编写格式正确的Ruby插件吗?

I think first of all you should learn the language. 我认为首先您应该学习语言。 I'm using ruby for at least 2 years and I'm still learning. 我正在使用ruby至少2年,但我仍在学习。

So writing a plugin while being a newbie it's not really a good idea. 因此,在成为新手的同时编写插件并不是一个好主意。

But anyway here is an example to build a gem : 但是无论如何,这里是构建gem的示例:

http://buzaz.com/index.php/2010/01/03/how-to-build-a-ruby-gem/ http://buzaz.com/index.php/2010/01/03/how-to-build-a-ruby-gem/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM