Class: Paru::PandocFilter::EmptyInline

Inherits:
Inline
  • Object
show all
Defined in:
lib/paru/filter/empty_inline.rb

Overview

An EmptyInline node, has no content

Direct Known Subclasses

LineBreak, SoftBreak, Space

Instance Attribute Summary

Attributes inherited from Node

#parent

Instance Method Summary collapse

Methods inherited from Inline

#is_inline?

Methods included from InnerMarkdown

#inner_markdown, #inner_markdown=

Methods inherited from Node

#ast_contents, #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_parent?, #has_string?, #is_block?, #is_inline?, #is_leaf?, #is_node?, #is_root?, #markdown, #markdown=, #toMetadata, #to_s, #type

Methods included from ASTManipulation

#append, #delete, #each_depth_first, #find_index, #get, #insert, #prepend, #remove_at, #replace, #replace_at

Constructor Details

#initialize(_) ⇒ EmptyInline

Create an EmptyInline node



27
28
29
# File 'lib/paru/filter/empty_inline.rb', line 27

def initialize _
    super []
end

Instance Method Details

#has_inline?Boolean

Has this empty inline contents?

Returns:

  • (Boolean)

    false



34
35
36
# File 'lib/paru/filter/empty_inline.rb', line 34

def has_inline?
    false
end

#to_astObject

Create an AST representation of this EmptyInline



39
40
41
42
43
# File 'lib/paru/filter/empty_inline.rb', line 39

def to_ast
    {
        "t" => ast_type
    }
end