Sha256: cacb08b89e7a360fbb1d7643a0138908a43915f0d47f3d1ed36bd6469a7fcfe1
Contents?: true
Size: 705 Bytes
Versions: 12
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true require "refinements/pathnames" module Tocer # Generates/updates Table of Contents for files in root path. class Runner using Refinements::Pathnames def initialize writer: Writer.new @writer = writer end def call configuration = Container[:configuration] Pathname(configuration.root_dir).files(%({#{configuration.includes.join ","}})) .each do |path| yield path if block_given? writer.call path, label: configuration.label end end private attr_reader :writer end end
Version data entries
12 entries across 12 versions & 1 rubygems