class Softcover::BookManifest::Chapter
Public Instance Methods
cache_filename()
click to toggle source
Returns the name for the cached version of the chapters. This is used when processing Markdown to avoid unnecessary calls to kramdown's to_latex method, which can get expensive.
# File lib/softcover/book_manifest.rb, line 93 def cache_filename Softcover::Utils.path("tmp/#{full_name}.cache") end
fragment_name()
click to toggle source
# File lib/softcover/book_manifest.rb, line 38 def fragment_name "#{slug}_fragment.#{html_extension}" end
fragment_path()
click to toggle source
# File lib/softcover/book_manifest.rb, line 42 def fragment_path File.join('html', fragment_name) end
full_name()
click to toggle source
# File lib/softcover/book_manifest.rb, line 86 def full_name "#{slug}#{extension}" end
html_title()
click to toggle source
Run the title through the Polytexnic pipeline to make an HTML title.
# File lib/softcover/book_manifest.rb, line 69 def html_title self.polytexnic_html(title) end
nodes()
click to toggle source
# File lib/softcover/book_manifest.rb, line 46 def nodes @nodes ||= [] end
source()
click to toggle source
# File lib/softcover/book_manifest.rb, line 77 def source case extension when '.md' :markdown when '.tex' :polytex end end
to_hash()
click to toggle source
# File lib/softcover/book_manifest.rb, line 73 def to_hash marshal_dump.merge({ menu_heading: menu_heading }) end