Skip to content
Execute ruby code from within C++/Qt programs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
qruby.cpp
qruby.h
qrubyarray.cpp
qrubyarray.h
qrubybignumber.cpp
qrubybignumber.h
qrubyclass.cpp
qrubyclass.h
qrubycomplex.cpp
qrubycomplex.h
qrubydata.cpp
qrubydata.h
qrubyfile.cpp
qrubyfile.h
qrubyfloat.cpp
qrubyfloat.h
qrubyhash.cpp
qrubyhash.h
qrubyid.cpp
qrubyid.h
qrubymodule.cpp
qrubymodule.h
qrubymutex.cpp
qrubymutex.h
qrubyobject.cpp
qrubyobject.h
qrubyrational.cpp
qrubyrational.h
qrubyregexp.cpp
qrubyregexp.h
qrubystring.cpp
qrubystring.h
qrubystruct.cpp
qrubystruct.h
qrubysymbol.cpp
qrubysymbol.h
qrubyvalue.cpp
qrubyvalue.h
qtruby.pri
qtruby.pro

README.md

Qt Pods

Support this and other free software projects of mine by donating bitcoins:

1Hk5EkcZRaio4uGXSU453E1bNFTecsZEpt

QtRuby

Execute ruby code seamlessly from within C++/Qt applications.

// Qt includes
#include <QCoreApplication>

// 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.

You can’t perform that action at this time.