class Tocer::Rake::Tasks
Provides Rake
tasks for convenience.
Public Class Methods
new(configuration: CLI::Configuration::Loader.new.call, runner: Runner.new)
click to toggle source
# File lib/tocer/rake/tasks.rb, line 16 def initialize configuration: CLI::Configuration::Loader.new.call, runner: Runner.new @configuration = configuration @runner = runner end
setup(= new.install)
click to toggle source
# File lib/tocer/rake/tasks.rb, line 14 def self.setup = new.install def initialize configuration: CLI::Configuration::Loader.new.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).to_h) end end private attr_reader :configuration, :runner end
Public Instance Methods
install()
click to toggle source
# File lib/tocer/rake/tasks.rb, line 21 def install desc "Add/Update Table of Contents (README)" task :toc, %i[label includes] do |_task, arguments| runner.call(**configuration.merge(**arguments.to_h).to_h) end end