From 32de86cfd368db7b487239c99b0468a6713271a7 Mon Sep 17 00:00:00 2001 From: Taichi Ishitani Date: Fri, 7 Jun 2024 21:48:29 +0900 Subject: [PATCH] use `autoload` to load JSON, TOML and YAML loaders --- lib/rggen/core.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/rggen/core.rb b/lib/rggen/core.rb index d15ad70..8b124d8 100644 --- a/lib/rggen/core.rb +++ b/lib/rggen/core.rb @@ -5,12 +5,13 @@ require 'erubi' require 'fileutils' require 'forwardable' -require 'json' require 'optparse' require 'pathname' require 'singleton' -require 'tomlrb' -require 'yaml' + +autoload :JSON, 'json' +autoload :Psych, 'yaml' +autoload :Tomlrb, 'tomlrb' require_relative 'core/version'