Module: BK::Dumpable

Included in:
Node
Defined in:
lib/bk/dump.rb

Instance Method Summary collapse

Instance Method Details

#dumpObject



5
6
7
8
9
10
11
# File 'lib/bk/dump.rb', line 5

def dump
  if children.any?
    [term, children.inject({}){ |h,(score,child)| h[score] = child.dump; h }]
  else
    [term]
  end
end