Class: Rugged::OdbObject

Inherits:
Object
  • Object
show all
Defined in:
ext/rugged/rugged_repo.c

Instance Method Summary collapse

Instance Method Details

#dataObject



69
70
71
72
73
74
# File 'ext/rugged/rugged_repo.c', line 69

static VALUE rb_git_odbobj_data(VALUE self)
{
	git_odb_object *obj;
	Data_Get_Struct(self, git_odb_object, obj);
	return rugged_str_ascii(git_odb_object_data(obj), git_odb_object_size(obj));
}

#hashObject



62
63
64
65
66
67
# File 'ext/rugged/rugged_repo.c', line 62

static VALUE rb_git_odbobj_hash(VALUE self)
{
	git_odb_object *obj;
	Data_Get_Struct(self, git_odb_object, obj);
	return rugged_create_oid(git_odb_object_id(obj));
}

#lenObject



76
77
78
79
80
81
# File 'ext/rugged/rugged_repo.c', line 76

static VALUE rb_git_odbobj_size(VALUE self)
{
	git_odb_object *obj;
	Data_Get_Struct(self, git_odb_object, obj);
	return INT2FIX(git_odb_object_size(obj));
}

#typeObject



83
84
85
86
87
88
# File 'ext/rugged/rugged_repo.c', line 83

static VALUE rb_git_odbobj_type(VALUE self)
{
	git_odb_object *obj;
	Data_Get_Struct(self, git_odb_object, obj);
	return INT2FIX(git_odb_object_type(obj));
}