module Asciidoctor::Converter::BackendInfo - asciidoctor-1.5.6.2 Documentation

# module Asciidoctor::Converter::BackendInfo

### Public Instance Methods

backend_info() click to toggle source

    # File lib/asciidoctor/converter.rb, line 71
    def backend_info
      @backend_info ||= setup_backend_info
    end

basebackend(value = nil) click to toggle source

    # File lib/asciidoctor/converter.rb, line 103
    def basebackend value = nil
      if value
        backend_info['basebackend'] = value
      else
        backend_info['basebackend']
      end
    end

filetype(value = nil) click to toggle source

    # File lib/asciidoctor/converter.rb, line 95
    def filetype value = nil
      if value
        backend_info['filetype'] = value
      else
        backend_info['filetype']
      end
    end

htmlsyntax(value = nil) click to toggle source

    # File lib/asciidoctor/converter.rb, line 119
    def htmlsyntax value = nil
      if value
        backend_info['htmlsyntax'] = value
      else
        backend_info['htmlsyntax']
      end
    end

outfilesuffix(value = nil) click to toggle source

    # File lib/asciidoctor/converter.rb, line 111
    def outfilesuffix value = nil
      if value
        backend_info['outfilesuffix'] = value
      else
        backend_info['outfilesuffix']
      end
    end

setup_backend_info() click to toggle source

    # File lib/asciidoctor/converter.rb, line 75
    def setup_backend_info
      raise ::ArgumentError, %Q(Cannot determine backend for converter: #{self.class}) unless @backend
      base = @backend.sub TrailingDigitsRx, ''
      if (ext = DEFAULT_EXTENSIONS[base])
        type = ext[1..-1]
      else
        # QUESTION should we be forcing the basebackend to html if unknown?
        base = 'html'
        ext = '.html'
        type = 'html'
        syntax = 'html'
      end
      {
        'basebackend' => base,
        'outfilesuffix' => ext,
        'filetype' => type,
        'htmlsyntax' => syntax
      }
    end