class Koara::Ast::BlockElement
Public Instance Methods
accept(renderer)
click to toggle source
# File lib/koara/ast/blockelement.rb, line 39 def accept(renderer) renderer.visit_block_element(self) end
has_children()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 8 def has_children self.children && self.children.length > 0 end
is_first_child()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 12 def is_first_child parent.children[0] == self end
is_last_child()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 16 def is_last_child parent.children.last == self end
is_single_child()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 24 def is_single_child parent.children.length == 1 end
nested()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 20 def nested !parent.instance_of? Document end
next()
click to toggle source
# File lib/koara/ast/blockelement.rb, line 28 def next i = 0 while (i < parent.children.length - 1) if (parent.children[i] == self) return parent.children[i + 1] end i+=1 end return nil end