module DeepCover::Node::Mixin::ChildCanBeEmpty
Attributes
last_empty_position[RW]
Public Class Methods
included(base)
click to toggle source
# File lib/deep_cover/node/mixin/child_can_be_empty.rb, line 8 def included(base) base.has_child_handler('%{name}_can_be_empty') end
Public Instance Methods
child_can_be_empty(_child, _name = nil)
click to toggle source
# File lib/deep_cover/node/mixin/child_can_be_empty.rb, line 22 def child_can_be_empty(_child, _name = nil) false end
remap_child(child, name)
click to toggle source
Calls superclass method
# File lib/deep_cover/node/mixin/child_can_be_empty.rb, line 13 def remap_child(child, name) if child == nil if (ChildCanBeEmpty.last_empty_position = child_can_be_empty(child, name)) return Node::EmptyBody end end super end