Class: Tocer::Rake::Register
- Inherits:
-
Object
- Object
- Tocer::Rake::Register
- Includes:
- Rake::DSL
- Defined in:
- lib/tocer/rake/register.rb
Overview
Registers Rake tasks for use.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration = Container[:configuration], runner: Runner.new) ⇒ Register
constructor
A new instance of Register.
Constructor Details
#initialize(configuration = Container[:configuration], runner: Runner.new) ⇒ Register
Returns a new instance of Register.
16 17 18 19 |
# File 'lib/tocer/rake/register.rb', line 16 def initialize configuration = Container[:configuration], runner: Runner.new @configuration = configuration @runner = runner end |
Class Method Details
.call ⇒ Object
14 |
# File 'lib/tocer/rake/register.rb', line 14 def self.call = new.call |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 |
# File 'lib/tocer/rake/register.rb', line 21 def call desc "Update/Insert Table of Contents" task :toc, %i[label patterns] do |_task, arguments| runner.call configuration.merge(arguments.to_h) end end |