Module: Holistic::Ruby::Scope::Lexical
Instance Method Summary collapse
Instance Method Details
#descendant?(child:, parent:) ⇒ Boolean
6 7 8 9 10 |
# File 'lib/holistic/ruby/scope/lexical.rb', line 6 def descendant?(child:, parent:) child_parent = child.lexical_parent child_parent.present? && (child_parent == parent || descendant?(child: child_parent, parent:)) end |