Sha256: badbedc47685f71f31762242a2cf3e1a76e41bde110d5250e2a59359d44052c2
Contents?: true
Size: 722 Bytes
Versions: 7
Compression:
Stored size: 722 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 = Container[:configuration], 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