Class: Paru::PandocFilter::MetaValue

Inherits:
Node
  • Object
show all
Includes:
InnerMarkdown
Defined in:
lib/paru/filter/meta_value.rb

Overview

A MetaValue Node is either a MetaMap, MetaList, MetaBool, MetaString, MetaInlines, or a MetaBlocks.

Direct Known Subclasses

MetaBool, MetaString

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #parent

Instance Method Summary collapse

Methods included from InnerMarkdown

#inner_markdown, #inner_markdown=

Methods inherited from Node

#ast_type, #can_act_as_both_block_and_inline?, #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

#initialize(value) ⇒ MetaValue

Create a new MetaValue Node based on the value

Parameters:

  • value (String)


40
41
42
# File 'lib/paru/filter/meta_value.rb', line 40

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueString|Boolean

Returns:

  • (String|Boolean)


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/paru/filter/meta_value.rb', line 32

class MetaValue < Node
  include InnerMarkdown

  attr_accessor :value

  # Create a new MetaValue Node based on the value
  #
  # @param value [String]
  def initialize(value)
    @value = value
  end

  # The AST contents
  def ast_contents
    @value
  end
end

Instance Method Details

#ast_contentsObject

The AST contents



45
46
47
# File 'lib/paru/filter/meta_value.rb', line 45

def ast_contents
  @value
end