Class: Paru::PandocFilter::Figure
- Includes:
- InnerMarkdown
- Defined in:
- lib/paru/filter/figure.rb
Overview
A Figure node consisting of an attribute object, a caption, and a list of Block nodes.
Instance Attribute Summary collapse
- #attr ⇒ Attr
-
#caption ⇒ Object
Caption.
Instance Method Summary collapse
-
#ast_contents ⇒ Object
Create an AST representation of this Figure node.
-
#has_block? ⇒ Boolean
Has this Figure node Blocks as children?.
-
#initialize(contents) ⇒ Figure
constructor
Create a new Figure node based on the contents.
-
#inner_markdown ⇒ String
included
from InnerMarkdown
Get the markdown representation of this Node's children.
-
#inner_markdown=(markdown) ⇒ Object
included
from InnerMarkdown
Replace this Node's children with the Nodes represented by the markdown string.
Constructor Details
Instance Attribute Details
#caption ⇒ Object
Returns Caption.
37 |
# File 'lib/paru/filter/figure.rb', line 37 attr_accessor :attr, :caption |
Instance Method Details
#ast_contents ⇒ Object
Create an AST representation of this Figure node.
49 50 51 52 53 54 55 |
# File 'lib/paru/filter/figure.rb', line 49 def ast_contents() [ @attr.to_ast, @caption.to_ast, super ] end |
#has_block? ⇒ Boolean
Has this Figure node Blocks as children?
60 61 62 |
# File 'lib/paru/filter/figure.rb', line 60 def has_block? true end |
#inner_markdown ⇒ String Originally defined in module InnerMarkdown
Get the markdown representation of this Node's children.
#inner_markdown=(markdown) ⇒ Object Originally defined in module InnerMarkdown
Replace this Node's children with the Nodes represented by the markdown string