Method: Rugged.features
- Defined in:
- ext/rugged/rugged.c
.features ⇒ Array
Returns an array representing the features that libgit2 was compiled with — this includes ‘:threads` (thread support), `:https` and `:ssh`.
Rugged.features #=> [:threads, :https]
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'ext/rugged/rugged.c', line 83
static VALUE rb_git_features(VALUE self)
{
VALUE ret_arr = rb_ary_new();
int caps = git_libgit2_features();
if (caps & GIT_FEATURE_THREADS)
rb_ary_push(ret_arr, CSTR2SYM("threads"));
if (caps & GIT_FEATURE_HTTPS)
rb_ary_push(ret_arr, CSTR2SYM("https"));
if (caps & GIT_FEATURE_SSH)
rb_ary_push(ret_arr, CSTR2SYM("ssh"));
return ret_arr;
}
|