From 05d681f91e45dfd487463f5108872d4bd30c1beb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 19 Apr 2024 10:23:14 +0900 Subject: [PATCH] Make `Output.new` accepts keyword arguments --- tool/lib/output.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tool/lib/output.rb b/tool/lib/output.rb index 5c645daca6..8cb426ae4a 100644 --- a/tool/lib/output.rb +++ b/tool/lib/output.rb @@ -4,10 +4,15 @@ require_relative 'colorize' class Output attr_reader :path, :vpath - def initialize - @path = @timestamp = @ifchange = @color = nil - @overwrite = @create_only = false - @vpath = VPath.new + def initialize(path: nil, timestamp: nil, ifchange: nil, color: nil, + overwrite: false, create_only: false, vpath: VPath.new) + @path = path + @timestamp = timestamp + @ifchange = ifchange + @color = color + @overwrite = overwrite + @create_only = create_only + @vpath = vpath end COLOR_WHEN = {