/* * Document-method: on_progress * * call-seq: on_progress = Proc.new {|str| ...} * * This callback setter allows you to pass a Proc/lambda or any other object that responds to #call. * * It will pass the caller a chunk of the encode buffer after it's reached it's internal max buffer size (defaults to 8kb). * For example, encoding a large object that would normally result in 24288 bytes of data will result in 3 calls to this callback (assuming the 8kb default encode buffer). */ static VALUE rb_yajl_encoder_set_progress_cb(VALUE self, VALUE callback) {