Class: ShoutMetadata
- Inherits:
-
Object
- Object
- ShoutMetadata
- Defined in:
- ext/shout.c
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'ext/shout.c', line 93
static VALUE _sh_metadata_new(VALUE class) {
shout_metadata_t *m;
VALUE meta;
m = shout_metadata_new();
meta = Data_Wrap_Struct(class, 0, shout_metadata_free, m);
rb_obj_call_init(meta, 0, 0);
return meta;
}
|
Instance Method Details
#add(name, value) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'ext/shout.c', line 106
static VALUE _sh_metadata_add(VALUE self, VALUE name, VALUE value) {
shout_metadata_t *m;
int err;
Data_Get_Struct(self, shout_metadata_t, m);
err = shout_metadata_add(m, STR2CSTR(name), STR2CSTR(value));
if(err != SHOUTERR_SUCCESS) {
raise_nonspecific_shout_error(err);
}
return value;
}
|