mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Make Output.new
accepts keyword arguments
This commit is contained in:
parent
801e4a4feb
commit
05d681f91e
1 changed files with 9 additions and 4 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue