#include "beeps/ruby/processor.h" #include "defs.h" RUCY_DEFINE_VALUE_FROM_TO(Beeps::FileIn) #define THIS to(self) #define CHECK RUCY_CHECK_OBJECT(Beeps::FileIn, self) static VALUE alloc(VALUE klass) { return new_type(klass); } static VALUE initialize(VALUE self, VALUE path) { RUCY_CHECK_OBJ(Beeps::FileIn, self); *THIS = Beeps::FileIn(to(path)); return self; } static Class cFileIn; void Init_beeps_file_in () { Module mBeeps = rb_define_module("Beeps"); cFileIn = mBeeps.define_class("FileIn", Beeps::processor_class()); rb_define_alloc_func(cFileIn, alloc); rb_define_private_method(cFileIn, "initialize", RUBY_METHOD_FUNC(initialize), 1); } namespace Beeps { Class file_in_class () { return cFileIn; } }// Beeps