dumm: Sort templates by name
This commit is contained in:
@@ -740,6 +740,7 @@ static VALUE template_each(int argc, VALUE *argv, VALUE class)
|
|||||||
static void template_init()
|
static void template_init()
|
||||||
{
|
{
|
||||||
rbc_template = rb_define_class_under(rbm_dumm , "Template", rb_cObject);
|
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, "load", template_load, 1);
|
||||||
rb_define_singleton_method(rbc_template, "unload", template_unload, 0);
|
rb_define_singleton_method(rbc_template, "unload", template_unload, 0);
|
||||||
|
|||||||
@@ -34,8 +34,9 @@ module Dumm
|
|||||||
if name
|
if name
|
||||||
Template.load name
|
Template.load name
|
||||||
else
|
else
|
||||||
Template.each {|t| puts t }
|
Template.sort.each {|t| puts t }
|
||||||
end
|
end
|
||||||
|
return Dumm
|
||||||
end
|
end
|
||||||
|
|
||||||
# unload template/overlays, reset all guests and delete bridges
|
# unload template/overlays, reset all guests and delete bridges
|
||||||
|
|||||||
Reference in New Issue
Block a user