Google

def Functions::lang( language ) @@node.collect do |node| if node.kind_of? Element lang = false until node.nil? or lang node = node.parent end end end end