Sha256: 7f5798ca96f96559e06a43904e655f368ed04045caf3b8d1c5b4e6f336c9fa72

Contents?: true

Size: 644 Bytes

Versions: 8

Compression:

Stored size: 644 Bytes

Contents

#include "system.h"

VALUE rb_mRCEE;
VALUE rb_mSystem;
VALUE rb_cSystemExtension;

static VALUE
rb_system_extension_class_do_something(VALUE self)
{
  int major, minor, patch;

  yaml_get_version(&major, &minor, &patch);

  return rb_sprintf("libyaml version %d.%d.%d", major, minor, patch);
}


void
Init_system(void)
{
  rb_mRCEE = rb_define_module("RCEE");
  rb_mSystem = rb_define_module_under(rb_mRCEE, "System");
  rb_cSystemExtension = rb_define_class_under(rb_mSystem, "Extension", rb_cObject);
  rb_define_singleton_method(rb_cSystemExtension, "do_something",
                             rb_system_extension_class_do_something, 0);
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rcee_system-0.6.0 ext/system/system.c
rcee_system-0.5.0.1 ext/system/system.c
rcee_system-0.5.1 ext/system/system.c
rcee_system-0.5.0 ext/system/system.c
rcee_system-0.4.0 ext/system/system.c
rcee_system-0.3.0 ext/system/system.c
rcee_system-0.2.0 ext/system/system.c
rcee_system-0.1.0 ext/system/system.c