Class: Wankel
- Inherits:
-
Object
- Object
- Wankel
- Defined in:
- lib/wankel.rb,
ext/wankel/wankel.c
Defined Under Namespace
Classes: EncodeError, ParseError, SaxEncoder, SaxParser
Constant Summary collapse
- DEFAULTS =
{ :read_buffer_size => 8092, :symbolize_keys => false, :allow_comments => false, :validate_utf8 => false, :allow_trailing_garbage => false, :multiple_values => false, :allow_partial_values => false, :write_buffer_size => 8092, :beautify => false, :indent_string => ' ', :validate_utf8 => false, :escape_solidus => false }
Class Method Summary collapse
- .dump(*args) ⇒ Object
- .encode(*args) ⇒ Object
-
.load(*args) ⇒ Object
Class Methods =============================================================.
-
.parse(*args) ⇒ Object
Class Methods =============================================================.
Class Method Details
.dump(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'ext/wankel/wankel.c', line 16
static VALUE wankel_encode(int argc, VALUE * argv, VALUE klass) {
VALUE encoder, input, output, options;
rb_scan_args(argc, argv, "12", &input, &output, &options);
if (TYPE(output) == T_HASH) {
encoder = rb_funcall(c_wankelEncoder, intern_new, 1, output);
return rb_funcall(encoder, intern_encode, 1, input);
} else {
encoder = rb_funcall(c_wankelEncoder, intern_new, 1, options);
return rb_funcall(encoder, intern_encode, 2, input, output);
}
}
|
.encode(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'ext/wankel/wankel.c', line 16
static VALUE wankel_encode(int argc, VALUE * argv, VALUE klass) {
VALUE encoder, input, output, options;
rb_scan_args(argc, argv, "12", &input, &output, &options);
if (TYPE(output) == T_HASH) {
encoder = rb_funcall(c_wankelEncoder, intern_new, 1, output);
return rb_funcall(encoder, intern_encode, 1, input);
} else {
encoder = rb_funcall(c_wankelEncoder, intern_new, 1, options);
return rb_funcall(encoder, intern_encode, 2, input, output);
}
}
|
.load(*args) ⇒ Object
Class Methods =============================================================
8 9 10 11 12 13 14 |
# File 'ext/wankel/wankel.c', line 8
static VALUE wankel_parse(int argc, VALUE * argv, VALUE klass) {
VALUE parser, input, options, callback;
rb_scan_args(argc, argv, "11&", &input, &options, &callback);
parser = rb_funcall(c_wankelParser, intern_new, 1, options);
return rb_funcall(parser, intern_parse, 2, input, callback);
}
|
.parse(*args) ⇒ Object
Class Methods =============================================================
8 9 10 11 12 13 14 |
# File 'ext/wankel/wankel.c', line 8
static VALUE wankel_parse(int argc, VALUE * argv, VALUE klass) {
VALUE parser, input, options, callback;
rb_scan_args(argc, argv, "11&", &input, &options, &callback);
parser = rb_funcall(c_wankelParser, intern_new, 1, options);
return rb_funcall(parser, intern_parse, 2, input, callback);
}
|