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 class Output
attr_reader :path, :vpath attr_reader :path, :vpath
def initialize def initialize(path: nil, timestamp: nil, ifchange: nil, color: nil,
@path = @timestamp = @ifchange = @color = nil overwrite: false, create_only: false, vpath: VPath.new)
@overwrite = @create_only = false @path = path
@vpath = VPath.new @timestamp = timestamp
@ifchange = ifchange
@color = color
@overwrite = overwrite
@create_only = create_only
@vpath = vpath
end end
COLOR_WHEN = { COLOR_WHEN = {