Module: HTree::Traverse

Included in:
Container::Trav, Leaf::Trav
Defined in:
lib/htree/traverse.rb,
lib/htree/modules.rb,
lib/htree/traverse.rb

Overview

:startdoc:

Instance Method Summary collapse

Instance Method Details

#bogusetag?Boolean

Returns:

  • (Boolean)


16
# File 'lib/htree/traverse.rb', line 16

def bogusetag?() BogusETag::Trav === self end

#comment?Boolean

Returns:

  • (Boolean)


15
# File 'lib/htree/traverse.rb', line 15

def comment?() Comment::Trav === self end

#doc?Boolean

Returns:

  • (Boolean)


9
# File 'lib/htree/traverse.rb', line 9

def doc?() Doc::Trav === self end

#doctype?Boolean

Returns:

  • (Boolean)


13
# File 'lib/htree/traverse.rb', line 13

def doctype?() DocType::Trav === self end

#elem?Boolean

Returns:

  • (Boolean)


10
# File 'lib/htree/traverse.rb', line 10

def elem?() Elem::Trav === self end

#get_subnode(*indexes) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/htree/traverse.rb', line 18

def get_subnode(*indexes)
  n = self
  indexes.each {|index|
    n = n.get_subnode_internal(index)
  }
  n
end

#procins?Boolean

Returns:

  • (Boolean)


14
# File 'lib/htree/traverse.rb', line 14

def procins?() ProcIns::Trav === self end

#text?Boolean

Returns:

  • (Boolean)


11
# File 'lib/htree/traverse.rb', line 11

def text?() Text::Trav === self end

#traverse_text(&block) ⇒ Object

traverse_text traverses texts in the tree



220
221
222
223
# File 'lib/htree/traverse.rb', line 220

def traverse_text(&block) # :yields: text
  traverse_text_internal(&block)
  nil
end

#xmldecl?Boolean

Returns:

  • (Boolean)


12
# File 'lib/htree/traverse.rb', line 12

def xmldecl?() XMLDecl::Trav === self end