lib/jumoku/builders/extended.rb
# Returns true if the specified branches are a subset of or match exactly the
# branches set of the tree (no ordering criterion).
#
# Labels are not part of the matching constraint: only connected nodes
# matter in defining branch equality.
#
# @param [*Branch, *nodes] *maybe_branches a list of branches, either as Branch
#   objects or as nodes pairs
# @return [Boolean]
#
Returns true if the specified branches are a subset of or match exactly the
branches set of the tree (no ordering criterion).

Labels are not part of the matching constraint: only connected nodes
matter in defining branch equality.
Returns true if the specified branches are a subset of or match exactly the branches set of the tree ( no ordering criterion ) . Labels are not part of the matching constraint : only connected nodes matter in defining branch equality .
def branches?(*maybe_branches)
      maybe_branches.create_branches_list(_branch_type).all? do |maybe_branch|
        branches.any? do |branch|
          maybe_branch == branch
        end
      end
    end
def branches? ( * maybe_branches ) maybe_branches . create_branches_list ( _branch_type ) . all? do | maybe_branch | branches . any? do | branch | maybe_branch == branch end end end
Returns true if the specified branches are a subset of or match exactly the
branches set of the tree (no ordering criterion).
Returns true if the specified branches are a subset of or match exactly the branches set of the tree ( no ordering criterion ) .
None
Boolean
maybe_branches
<not_specific>
<not_specific>
maybe_branches a list of branches, either as Branch objects or as nodes pairs
maybe_branches a list of branches either as Branch objects or as nodes pairs