From 490c082b66054a5617a79e80dae7160eec8cbdb1 Mon Sep 17 00:00:00 2001 From: Yutaka Kamei Date: Thu, 12 Sep 2024 17:44:29 +0900 Subject: [PATCH] Update instructions for defining classes and modules init_new_gem I often wonder whether to split the definitions into multiple files or combine them into a single RBS file. Of course, this depends on the size of the gem or the preferences of the first gem's RBS contributor. Therefore, I think it's worth noting both strategies in the generated RBS file. --- bin/init_new_gem | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/init_new_gem b/bin/init_new_gem index 0efa7778..135597d4 100755 --- a/bin/init_new_gem +++ b/bin/init_new_gem @@ -49,6 +49,9 @@ base = Pathname("gems/#{gem_name}/#{version}") put base / "#{gem_name}.rbs", <<~RBS # Write the type definition here! + # + # You can write all the definitions in this file, + # or you can split the definitions into multiple files by organizing them into classes or modules. RBS put base / "_test/test.rb", <<~RUBY # Write Ruby code to test the RBS.