Module: CoreExtensions::Ox::ElementAdditions

Defined in:
lib/core_extensions/ox/element_additions.rb

Instance Method Summary collapse

Instance Method Details

#<<(node) ⇒ Object

We override << so that we can handle the case where we try and add a null node child - in which case, rather than allowing Oc to raise an error, we silently return self



9
10
11
12
13
# File 'lib/core_extensions/ox/element_additions.rb', line 9

def <<(node)
  return self unless node

  super
end