source: libcaca/trunk/ruby/caca.c @ 2077

Last change on this file since 2077 was 2077, checked in by Pascal Terjan, 13 years ago
  • Add Caca.version and Cucul.version
  • Property svn:eol-style set to native
File size: 790 bytes
Line 
1/*
2 *  libcaca Ruby bindings
3 *  Copyright (c) 2007 Pascal Terjan <pterjan@linuxfr.org>
4 *
5 *  This library is free software. It comes without any warranty, to
6 *  the extent permitted by applicable law. You can redistribute it
7 *  and/or modify it under the terms of the Do What The Fuck You Want
8 *  To Public License, Version 2, as published by Sam Hocevar. See
9 *  http://sam.zoy.org/wtfpl/COPYING for more details.
10 */
11
12#include <ruby.h>
13#include <caca.h>
14
15#include "caca-display.h"
16#include "caca-event.h"
17
18static VALUE get_version(VALUE self)
19{
20    return rb_str_new2(caca_get_version());
21}
22
23void Init_caca()
24{
25    VALUE mCaca = rb_define_module("Caca");
26
27    rb_define_singleton_method(mCaca, "version", get_version, 0);
28
29    Init_caca_display(mCaca);
30    Init_caca_event(mCaca);
31}
Note: See TracBrowser for help on using the repository browser.