Sha256: fa9125c91caa1cae991503db7fbccb44a74fc6f93553a9b743a018a09ae49bfa
Contents?: true
Size: 614 Bytes
Versions: 14
Compression:
Stored size: 614 Bytes
Contents
module DeepCover module Node::Mixin module ChildCanBeEmpty class << self attr_accessor :last_empty_position # Ugly hack to pass info from Handler to constructor def included(base) base.has_child_handler('%{name}_can_be_empty') end end def remap_child(child, name=raise) if child == nil if (ChildCanBeEmpty.last_empty_position = child_can_be_empty(child, name)) return Node::EmptyBody end end super end def child_can_be_empty(_child, _name=nil) false end end end end
Version data entries
14 entries across 14 versions & 1 rubygems