Class: AsciiDoc::AsciiBlock

Inherits:
Object
  • Object
show all
Includes:
AsciiCharPlugins
Defined in:
lib/asciidoc/asciiblock.rb

Constant Summary

Constants included from AsciiCharPlugins

AsciiDoc::AsciiCharPlugins::CharPlugins

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AsciiCharPlugins

#order_plugins, register

Constructor Details

#initialize(element) ⇒ AsciiBlock

Returns a new instance of AsciiBlock.



9
10
11
12
13
14
# File 'lib/asciidoc/asciiblock.rb', line 9

def initialize(element)
  @element = element
  @chars = AsciiDoc::AsciiChars.new(@element.children[0]) # only works when passing an element with a single child (the whole paragraph)
  @element.children[0] = ""
  parse_chars
end

Instance Attribute Details

#elementObject

Returns the value of attribute element.



7
8
9
# File 'lib/asciidoc/asciiblock.rb', line 7

def element
  @element
end