blob: b632ae8495be32d301c8fea756d8de2213057baf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "yay2.h"
VALUE
yay_value(void)
{
return rb_str_new_cstr("yaaay");
}
static VALUE
yay2_f_version(VALUE klass)
{
return rb_str_new_cstr("2.0.0");
}
static VALUE
yay2_yay(VALUE klass)
{
return yay_value();
}
void
Init_yay2(void)
{
VALUE mod = rb_define_module("Yay");
rb_define_const(mod, "VERSION", rb_str_new_cstr("2.0.0"));
rb_define_singleton_method(mod, "version", yay2_f_version, 0);
rb_define_singleton_method(mod, "yay", yay2_yay, 0);
}
|