class Asciidoctor::Inline

Public: Methods for managing inline elements in AsciiDoc block

Attributes

target[RW]

Public: Get/Set the target (e.g., uri) of this inline element

template_name[RW]

Public: Get/Set the String name of the render template

text[R]

Public: Get the text of this inline element

type[R]

Public: Get the type (qualifier) of this inline element

Public Class Methods

new(parent, context, text = nil, opts = {}) click to toggle source
Calls superclass method Asciidoctor::AbstractNode.new
# File lib/asciidoctor/inline.rb, line 16
def initialize(parent, context, text = nil, opts = {})
  super(parent, context)
  @template_name = "inline_#{context}"

  @text = text 

  @id = opts[:id]
  @type = opts[:type]
  @target = opts[:target]
  
  if opts.has_key?(:attributes) && (attributes = opts[:attributes]).is_a?(Hash)
    update_attributes(opts[:attributes]) unless attributes.empty?
  end
end

Public Instance Methods

render() click to toggle source
# File lib/asciidoctor/inline.rb, line 31
def render
  renderer.render(@template_name, self).chomp
end