Method: HTree::Doc#get_subnode_internal

Defined in:
lib/htree/doc.rb

#get_subnode_internal(index) ⇒ Object

:nodoc:



65
66
67
68
69
70
71
72
73
74
# File 'lib/htree/doc.rb', line 65

def get_subnode_internal(index) # :nodoc:
  unless Integer === index
    raise TypeError, "invalid index: #{index.inspect}"
  end
  if index < 0 || @children.length <= index
    nil
  else
    @children[index]
  end
end