summaryrefslogtreecommitdiff
path: root/tool/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-04-19 10:23:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-04-19 14:12:42 +0900
commit05d681f91e45dfd487463f5108872d4bd30c1beb (patch)
tree1ce86c3b1329bfa1ed396f68c14df7cf4478f2f8 /tool/lib
parent801e4a4febbb226a7afd764c84b15f183d857815 (diff)
Make `Output.new` accepts keyword arguments
Diffstat (limited to 'tool/lib')
-rw-r--r--tool/lib/output.rb13
1 files 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 = {