Class: Paru::PandocFilter::Span
- Defined in:
- lib/paru/filter/span.rb
Overview
A Span node is a general Inline level node with attributes and contens
Instance Attribute Summary collapse
Attributes inherited from Node
Instance Method Summary collapse
-
#ast_contents ⇒ Array
The AST contents.
-
#initialize(contents) ⇒ Span
constructor
Create a new Span node based on the contents.
Methods inherited from Inline
Methods included from InnerMarkdown
#inner_markdown, #inner_markdown=
Methods inherited from Node
#ast_type, #can_act_as_both_block_and_inline?, #children, #children=, #each, from_markdown, #get_replacement, #has_been_replaced?, #has_block?, #has_children?, #has_class?, #has_inline?, #has_parent?, #has_string?, #is_block?, #is_inline?, #is_leaf?, #is_node?, #is_root?, #markdown, #markdown=, #toMetadata, #to_ast, #to_s, #type
Methods included from ASTManipulation
#append, #delete, #each_depth_first, #find_index, #get, #insert, #prepend, #remove_at, #replace, #replace_at
Constructor Details
Instance Attribute Details
#attr ⇒ Attr
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/paru/filter/span.rb', line 29 class Span < Inline attr_accessor :attr # Create a new Span node based on the contents # # @param contents [Array] def initialize(contents) @attr = Attr.new contents[0] super contents[1] end # The AST contents # # @return [Array] def ast_contents() [ @attr.to_ast, super ] end end |
Instance Method Details
#ast_contents ⇒ Array
The AST contents
43 44 45 46 47 48 |
# File 'lib/paru/filter/span.rb', line 43 def ast_contents() [ @attr.to_ast, super ] end |