Class: Tilt::AsciidoctorTemplate

Inherits:
Template show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/asciidoc.rb

Overview

Asciidoctor implementation for AsciiDoc see: asciidoctor.github.com/

Asciidoctor is an open source, pure-Ruby processor for converting AsciiDoc documents or strings into HTML 5, DocBook 4.5 and other formats.

Instance Attribute Summary

Attributes inherited from Template

#data, #file, #line, #options

Instance Method Summary collapse

Methods inherited from Template

#basename, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render

Constructor Details

This class inherits a constructor from Tilt::Template

Instance Method Details

#allows_script?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/asciidoc.rb', line 23

def allows_script?
  false
end

#evaluate(scope, locals, &block) ⇒ Object



19
20
21
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/asciidoc.rb', line 19

def evaluate(scope, locals, &block)
  @output ||= Asciidoctor.render(data, options, &block)
end

#prepareObject



15
16
17
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/asciidoc.rb', line 15

def prepare
  options[:header_footer] = false if options[:header_footer].nil?
end