From ba12a9868a58368ccf7e112bf33227d021a2d972 Mon Sep 17 00:00:00 2001 From: Insality Date: Wed, 23 Sep 2020 01:21:44 +0300 Subject: [PATCH] Add __tostring to component class --- druid/component.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/druid/component.lua b/druid/component.lua index 3d8fb60..5c263c9 100644 --- a/druid/component.lua +++ b/druid/component.lua @@ -189,6 +189,11 @@ function Component.initialize(self, name, interest) end +function Component:__tostring() + return self._component.name +end + + --- Create new component. It will inheritance from basic -- druid component. -- @function Component.create