Class: AsciidoctorVaped::AST::Document
- Defined in:
- lib/asciidoctor_vaped/ast/document.rb
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#doctitle ⇒ Object
Returns the value of attribute doctitle.
Attributes inherited from Node
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(source, attributes: {}) ⇒ Document
constructor
A new instance of Document.
- #register_attribute(name, value) ⇒ Object
- #source ⇒ Object
- #to_h ⇒ Object
Methods inherited from Node
#<<, #append, #append_children, #parse_inline, #sections, #text
Constructor Details
#initialize(source, attributes: {}) ⇒ Document
Returns a new instance of Document.
11 12 13 14 15 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 11 def initialize(source, attributes: {}) @attributes = attributes.dup @source = source super() end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 9 def attributes @attributes end |
#doctitle ⇒ Object
Returns the value of attribute doctitle.
8 9 10 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 8 def doctitle @doctitle end |
Instance Method Details
#context ⇒ Object
17 18 19 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 17 def context :document end |
#register_attribute(name, value) ⇒ Object
25 26 27 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 25 def register_attribute(name, value) attributes[name.to_s] = value end |
#source ⇒ Object
21 22 23 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 21 def source @source.dup end |
#to_h ⇒ Object
29 30 31 |
# File 'lib/asciidoctor_vaped/ast/document.rb', line 29 def to_h super.merge(doctitle:) end |