From d55b93c866d7ef1fbebda52ec5d11dc0f870a2c0 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sat, 29 Oct 2022 18:03:30 +0200 Subject: [PATCH] Rename `read_rule_doc` -> `read_type_doc` Also, move the helper script into the `contrib` directory --- src/ameba/rule/base.cr | 6 +++--- src/{read_rule_doc.cr => contrib/read_type_doc.cr} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename src/{read_rule_doc.cr => contrib/read_type_doc.cr} (100%) diff --git a/src/ameba/rule/base.cr b/src/ameba/rule/base.cr index 5d8ac2cb..70ae53d8 100644 --- a/src/ameba/rule/base.cr +++ b/src/ameba/rule/base.cr @@ -138,8 +138,8 @@ module Ameba::Rule end end - private macro read_rule_doc(filepath = __FILE__) - {{ run("../../read_rule_doc", + private macro read_type_doc(filepath = __FILE__) + {{ run("../../contrib/read_type_doc", @type.name.split("::").last, filepath ).chomp.stringify }}.presence @@ -160,7 +160,7 @@ module Ameba::Rule # # MyRule.parsed_doc # => "This is a test rule.\nDoes nothing." # ``` - class_getter parsed_doc : String? = read_rule_doc + class_getter parsed_doc : String? = read_type_doc end end diff --git a/src/read_rule_doc.cr b/src/contrib/read_type_doc.cr similarity index 100% rename from src/read_rule_doc.cr rename to src/contrib/read_type_doc.cr