lib/jumoku/ext/ext.rb
# Create a list of branches object based on an expandable array of nodes.
#
# TODO: refacto, it's painful having to pass the branch_type
#
# @param [DirectedBranch, UndirectedBranch] branch_type
#
Create a list of branches object based on an expandable array of nodes.
TODO: refacto, it's painful having to pass the branch_type
Create a list of branches object based on an expandable array of nodes . TODO : refacto it ' s painful having to pass the branch_type
def create_branches_list(branch_type)
    branches = []
    self.expand_branches!.each_by(2) { |pair| branches << branch_type.new(pair[0], pair[1]) }
    branches
  end
def create_branches_list ( branch_type ) branches = [ ] self . expand_branches! . each_by ( 2 ) { | pair | branches << branch_type . new ( pair [ 0 ] , pair [ 1 ] ) } branches end
Create a list of branches object based on an expandable array of nodes.
Create a list of branches object based on an expandable array of nodes .
branch_type
<not_specific>
<not_specific>
None