Class: Rubysmith::Extensions::Tocer

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/extensions/tocer.rb

Overview

Ensures project skeleton documentation has table of content.

Instance Method Summary collapse

Constructor Details

#initialize(client: ::Tocer::Runner.new(io: StringIO.new)) ⇒ Tocer

Returns a new instance of Tocer.



15
16
17
18
# File 'lib/rubysmith/extensions/tocer.rb', line 15

def initialize(client: ::Tocer::Runner.new(io: StringIO.new), **)
  @client = client
  super(**)
end

Instance Method Details

#callObject



20
21
22
23
24
25
26
# File 'lib/rubysmith/extensions/tocer.rb', line 20

def call
  return false unless settings.build_readme && settings.markdown?

  logger.info { "Adding table of contents..." }
  upsert
  true
end