Class: Plamo::Middleware

Inherits:
Object
  • Object
show all
Defined in:
ext/plamo/plamo_middleware.c

Instance Method Summary collapse

Constructor Details

#initialize(rb_config, rb_callback) ⇒ Object



164
165
166
167
168
169
170
# File 'ext/plamo/plamo_middleware.c', line 164

static VALUE initialize(VALUE self, VALUE rb_config, VALUE rb_callback) {
  PlamoRbCallbackConfig *plamo_rb_calback_config = malloc(sizeof(PlamoRbCallbackConfig));
  plamo_rb_calback_config->config = rb_config;
  plamo_rb_calback_config->callback = rb_callback;
  DATA_PTR(self) = plamo_middleware_new(plamo_rb_calback_config, before_plamo_callback);
  return self;
}