Class: HtmlToProsemirror::Nodes::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/html_to_prosemirror/nodes/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dom_node) ⇒ Node

Returns a new instance of Node.



12
13
14
# File 'lib/html_to_prosemirror/nodes/node.rb', line 12

def initialize(dom_node)
  @node = dom_node
end

Instance Attribute Details

#typeObject



8
9
10
# File 'lib/html_to_prosemirror/nodes/node.rb', line 8

def type
  @type || 'node'
end

#wrapper=(value) ⇒ Object (writeonly)

Sets the attribute wrapper

Parameters:

  • value

    the value to set the attribute wrapper to.



5
6
7
# File 'lib/html_to_prosemirror/nodes/node.rb', line 5

def wrapper=(value)
  @wrapper = value
end

Instance Method Details

#dataObject



20
21
22
# File 'lib/html_to_prosemirror/nodes/node.rb', line 20

def data
  {}
end

#matchingObject



16
17
18
# File 'lib/html_to_prosemirror/nodes/node.rb', line 16

def matching
  false
end