Sha256: 969db2c31375a598fd7baf6f256fe692e77e66c8f955a04fe7893710731caee0
Contents?: true
Size: 723 Bytes
Versions: 7
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true require "rake" require "tocer" require "refinements/structs" module Tocer module Rake # Provides Rake tasks for convenience. class Tasks include ::Rake::DSL using Refinements::Structs def self.setup = new.install def initialize configuration = Configuration::Loader.call, runner: Runner.new @configuration = configuration @runner = runner end def install desc "Add/Update Table of Contents (README)" task :toc, %i[label includes] do |_task, arguments| runner.call configuration.merge(**arguments.to_h) end end private attr_reader :configuration, :runner end end end
Version data entries
7 entries across 7 versions & 1 rubygems