Class: ShoutMetadata
- Inherits:
-
Object
- Object
- ShoutMetadata
- Defined in:
- ext/shout_ext.c
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'ext/shout_ext.c', line 100
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
113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'ext/shout_ext.c', line 113
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, StringValuePtr(name), StringValuePtr(value));
if(err != SHOUTERR_SUCCESS) {
raise_nonspecific_shout_error(err);
}
return value;
}
|