[PATCH v1 compass-ci 1/4] providers/libvirt: basic class to save common methods

20 Jan
2021
20 Jan
'21
4:46 p.m.
Signed-off-by: Xiao Shenwei <xiaoshenwei96@163.com> --- providers/libvirt/lib/base.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 providers/libvirt/lib/base.rb diff --git a/providers/libvirt/lib/base.rb b/providers/libvirt/lib/base.rb new file mode 100644 index 0000000..2e8a74d --- /dev/null +++ b/providers/libvirt/lib/base.rb @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +# save common variables and methods +class Base + attr_reader :logger + + def add_logger(logger) + @logger = logger + self + end +end -- 2.23.0
1545
Age (days ago)
1545
Last active (days ago)
0 comments
1 participants
participants (1)
-
Xiao Shenwei