dumm: Sort templates by name

This commit is contained in:
Tobias Brunner
2013-07-15 14:37:05 +02:00
parent 9e7a45bec2
commit 1ee1163214
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -740,6 +740,7 @@ static VALUE template_each(int argc, VALUE *argv, VALUE class)
static void template_init()
{
rbc_template = rb_define_class_under(rbm_dumm , "Template", rb_cObject);
rb_include_module(rb_class_of(rbc_template), rb_mEnumerable);
rb_define_singleton_method(rbc_template, "load", template_load, 1);
rb_define_singleton_method(rbc_template, "unload", template_unload, 0);
+2 -1
View File
@@ -34,8 +34,9 @@ module Dumm
if name
Template.load name
else
Template.each {|t| puts t }
Template.sort.each {|t| puts t }
end
return Dumm
end
# unload template/overlays, reset all guests and delete bridges