-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,16 @@ | ||
#include <rice/rice.hpp> | ||
#include <rice/stl.hpp> | ||
|
||
#include "version.hpp" | ||
#include "odgi-api.h" | ||
|
||
using namespace Rice; | ||
|
||
// version.hpp | ||
|
||
String get_version() | ||
{ | ||
return String(odgi::Version::get_version()); | ||
} | ||
|
||
String get_release() | ||
{ | ||
return String(odgi::Version::get_release()); | ||
} | ||
|
||
String get_codename() | ||
{ | ||
return String(odgi::Version::get_codename()); | ||
} | ||
|
||
String get_short() | ||
{ | ||
return String(odgi::Version::get_short()); | ||
String rb_odgi_version() { | ||
return detail::to_ruby(odgi_version()); | ||
} | ||
|
||
// odgi.hpp | ||
|
||
extern "C" void Init_odgi(void) | ||
extern "C" void Init_odgi() | ||
{ | ||
define_module("Odgi") | ||
.define_module_function("get_version", &get_version) | ||
.define_module_function("get_release", &get_release) | ||
.define_module_function("get_codename", &get_codename) | ||
.define_module_function("get_short", &get_short); | ||
.define_module_function("odgi_version", &rb_odgi_version); | ||
} |