Sha256: fbd118a5fe0f25b446c4c4263e9cccd773c583d7717325c620ac7f52c28de0b6
Contents?: true
Size: 641 Bytes
Versions: 26
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true 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) 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
26 entries across 26 versions & 2 rubygems