class Paru::PandocFilter::Caption
A table or figure’s caption, can contain an optional short caption
Attributes
Public Class Methods
Source
# File lib/paru/filter/caption.rb, line 34 def initialize(contents) if contents[0].nil? @short = nil else @short = ShortCaption.new contents[0] end super(contents[1]) end
Create a new Caption
based on the contents
@param contents [Array]
Calls superclass method
Public Instance Methods
Source
# File lib/paru/filter/caption.rb, line 60 def ast_contents() [ if has_short? then @short.to_ast else nil end, @children.map {|row| row.to_ast} ] end
The AST contents of this Caption
node
@return [Array]
Source
# File lib/paru/filter/caption.rb, line 53 def has_block? true end
Has this node a block?
@return [Boolean] true
Source
# File lib/paru/filter/caption.rb, line 46 def has_short?() not @short.nil? end
Does this Caption
have a short caption?
@return [Boolean]