Module: Dcha::MPT::Node::Findable

Included in:
Dcha::MPT::Node
Defined in:
lib/dcha/mpt/node/findable.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#find(nbk) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/dcha/mpt/node/findable.rb', line 6

def find(nbk)
  case type
  when :blank then Node::BLANK.first
  when :branch then find_branch(nbk)
  when :leaf then find_leaf(nbk)
  when :extension then find_extension(nbk)
  end
end