Make Output.new accepts keyword arguments

This commit is contained in:
Nobuyoshi Nakada 2024-04-19 10:23:14 +09:00
parent 801e4a4feb
commit 05d681f91e
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -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 = {