Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacob3141/qtruby
Execute ruby code from within C++/Qt programs
https://github.com/jacob3141/qtruby
Last synced: 25 days ago
JSON representation
Execute ruby code from within C++/Qt programs
- Host: GitHub
- URL: https://github.com/jacob3141/qtruby
- Owner: jacob3141
- License: agpl-3.0
- Created: 2015-06-10T06:44:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-30T00:43:24.000Z (about 9 years ago)
- Last Synced: 2024-05-19T04:57:40.373Z (7 months ago)
- Language: C++
- Size: 180 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-qt - qtruby - Use Ruby as a scripting language within your application. (Libraries / Integrations)
README
[![Qt Pods](http://qt-pods.org/assets/logo.png "Qt Pods")](http://qt-pods.org)
Support this and other free software projects of mine by donating bitcoins:
```cpp
1Hk5EkcZRaio4uGXSU453E1bNFTecsZEpt
```# QtRuby
Execute ruby code seamlessly from within C++/Qt applications.
```cpp
// Qt includes
#include// QtRuby includes
#include "qruby.h"
#include "qrubyvalue.h"int main(int argc, char *argv[]) {
QCoreApplication app(argc, argv);
Q_UNUSED(app);QRuby rb;
rb.printVersion();
rb.evaluate("(1..10).each do |n| puts n end");return 0;
}
```# Installation and usage
Installation via qt-pods recommended. You can update your version at any time and switch back flawlessly, since it will be embedded as a git submodule. It is not recommended to plain copy the code into your target application. In order to learn more about qt-pods, see here:
https://github.com/cybercatalyst/qt-pods
# Dependencies
You need to install the ruby2.1-dev package.
# License
Licensed under GNU AGPLv3. Available under a commercial license, too.