Module: Asciidoctor::Converter::BackendTraits

Defined in:
lib/asciidoctor/converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.derive_backend_traits(backend, basebackend = nil) ⇒ Object

Deprecated.

Do not use this in new code, and replace it when updating old code.

Use Asciidoctor::Converter.derive_backend_traits instead.



139
140
141
# File 'lib/asciidoctor/converter.rb', line 139

def self.derive_backend_traits backend, basebackend = nil
  Converter.derive_backend_traits backend, basebackend
end

Instance Method Details

#backend_traits(basebackend = nil) ⇒ Object Also known as: backend_info



132
133
134
# File 'lib/asciidoctor/converter.rb', line 132

def backend_traits basebackend = nil
  @backend_traits ||= Converter.derive_backend_traits @backend, basebackend
end

#basebackend(value = nil) ⇒ Object



104
105
106
# File 'lib/asciidoctor/converter.rb', line 104

def basebackend value = nil
  value ? ((backend_traits value)[:basebackend] = value) : backend_traits[:basebackend]
end

#filetype(value = nil) ⇒ Object



108
109
110
# File 'lib/asciidoctor/converter.rb', line 108

def filetype value = nil
  value ? (backend_traits[:filetype] = value) : backend_traits[:filetype]
end

#htmlsyntax(value = nil) ⇒ Object



112
113
114
# File 'lib/asciidoctor/converter.rb', line 112

def htmlsyntax value = nil
  value ? (backend_traits[:htmlsyntax] = value) : backend_traits[:htmlsyntax]
end

#init_backend_traits(value = nil) ⇒ Object



128
129
130
# File 'lib/asciidoctor/converter.rb', line 128

def init_backend_traits value = nil
  @backend_traits = value || {}
end

#outfilesuffix(value = nil) ⇒ Object



116
117
118
# File 'lib/asciidoctor/converter.rb', line 116

def outfilesuffix value = nil
  value ? (backend_traits[:outfilesuffix] = value) : backend_traits[:outfilesuffix]
end

#supports_templates(value = true) ⇒ Object



120
121
122
# File 'lib/asciidoctor/converter.rb', line 120

def supports_templates value = true
  backend_traits[:supports_templates] = value
end

#supports_templates?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/asciidoctor/converter.rb', line 124

def supports_templates?
  backend_traits[:supports_templates]
end