Class: Visitor
- Inherits:
-
Object
show all
- Defined in:
- lib/jay_flavored_markdown/markdown_converter.rb
Constant Summary
collapse
- DISPATCHER =
Hash.new {|h,k| h[k] = "visit_#{k}"}
Instance Method Summary
collapse
Instance Method Details
#traverse(el) ⇒ Object
295
296
297
298
299
300
301
302
303
304
305
|
# File 'lib/jay_flavored_markdown/markdown_converter.rb', line 295
def traverse(el)
call = DISPATCHER[el.type]
if respond_to?(call)
send(call, el)
else
el.children.each do |child|
traverse(child)
end
end
return el
end
|