Class: Markdown::File

Inherits:
File
  • Object
show all
Defined in:
lib/sixarm_ruby_markdown_table_of_contents/markdown/file.rb

Overview

Markdown::File#refresh_toc

Instance Method Summary collapse

Instance Method Details

#rewrite_tocObject



12
13
14
# File 'lib/sixarm_ruby_markdown_table_of_contents/markdown/file.rb', line 12

def rewrite_toc
  rewrite(slurp.refresh_toc)
end

#slurpObject



8
9
10
# File 'lib/sixarm_ruby_markdown_table_of_contents/markdown/file.rb', line 8

def slurp
  Markdown::String.new(read.scrub)
end