class Rubydex::Document
Public Instance Methods
static VALUE rdxr_document_definitions(VALUE self) {
if (!rb_block_given_p()) {
return rb_enumeratorize_with_size(self, rb_str_new2("definitions"), 0, NULL, document_definitions_size);
}
HandleData *data;
void *graph = rdxi_graph_from_handle(self, &data);
void *iter = rdx_document_definitions_iter_new(graph, data->id);
VALUE args = rb_ary_new_from_args(2, self, ULL2NUM((uintptr_t)iter));
rb_ensure(document_definitions_yield, args, document_definitions_ensure, args);
return self;
}
Returns an enumerator that yields all definitions for this document lazily.
Source
lazily
static VALUE rdxr_document_method_references(VALUE self) {
if (!rb_block_given_p()) {
return rb_enumeratorize_with_size(self, rb_str_new2("method_references"), 0, NULL,
document_method_references_size);
}
HandleData *data;
void *graph = rdxi_graph_from_handle(self, &data);
void *iter = rdx_document_method_references_iter_new(graph, data->id);
VALUE args = rb_ary_new_from_args(2, data->graph_obj, ULL2NUM((uintptr_t)iter));
rb_ensure(rdxi_method_references_yield, args, rdxi_method_references_ensure, args);
return self;
}
Source
static VALUE rdxr_document_uri(VALUE self) {
HandleData *data;
void *graph = rdxi_graph_from_handle(self, &data);
const char *uri = rdx_document_uri(graph, data->id);
return rdxi_owned_c_string_to_ruby(uri);
}
Returns the document URI.