Sha256: 59bcc4089a6e989cde250ea1bd25db8a6bbf3c585f8151ee956417bd119234b9
Contents?: true
Size: 605 Bytes
Versions: 8
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true require "refinements/pathname" module Tocer # Generates/updates Table of Contents for files in root path. class Runner include Import[:settings, :io] using Refinements::Pathname def initialize(writer: Writer.new, **) super(**) @writer = writer end def call settings.root_dir .files(%({#{settings.patterns.join ","}})) .each do |path| io.puts " #{path}" writer.call path, label: settings.label end end private attr_reader :writer end end
Version data entries
8 entries across 8 versions & 1 rubygems