Class: Y::RenderRules::Node

Inherits:
Data
  • Object
show all
Defined in:
lib/y/rendering.rb

Overview

What a callback receives. attrs keys are as stored (Lexical's own props keep their "__" prefix); content is the node's children, already rendered to an HTML string; child_types lists the node's element/block children by type, in document order — the structural facts attrs and content can't answer (a gallery's image count, whether a list item holds a nested list).

Instance Attribute Summary collapse

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs

Returns:

  • (Object)

    the current value of attrs



64
65
66
# File 'lib/y/rendering.rb', line 64

def attrs
  @attrs
end

#child_typesObject (readonly)

Returns the value of attribute child_types

Returns:

  • (Object)

    the current value of child_types



64
65
66
# File 'lib/y/rendering.rb', line 64

def child_types
  @child_types
end

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



64
65
66
# File 'lib/y/rendering.rb', line 64

def content
  @content
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



64
65
66
# File 'lib/y/rendering.rb', line 64

def type
  @type
end