Methods

Class/Module Index [+]

Quicksearch

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

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
# File lib/asciidoctor/inline.rb, line 13
def initialize(parent, context, text = nil, opts = {})
  super(parent, context)

  @text = text 

  #@id = opts[:id] if opts.has_key?(:id)
  #@type = opts[:type] if opts.has_key?(:type)
  #@target = opts[:target] if opts.has_key?(:target)

  @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("inline_#{@context}", self).chomp
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.