lib/docrb/lib/docrb/comment_parser.rb
def update_next_reference(contents)
      return update_string_reference(contents) if contents.is_a? String

      new_contents = []
      changed = false
      contents.each do |block|
        if block[:type] == :span
          updated, ok = update_next_reference(block[:contents])
          if ok
            changed = true
            next new_contents.append(*updated)
          end
        end
        new_contents << block
      end

      [new_contents, changed]
    end
# Internal: Recursivelly updates a given value until all references are
# processed.
#
# contents - Contents to be processed
#
# Returns a new array containing the processed contents
Recursivelly updates a given value until all references are
processed.

Contents to be processed

Returns a new array containing the processed contents
Recursivelly updates a given value until all references are processed . Contents to be processed Returns a new array containing the processed contents
def update_next_reference(contents)
      return update_string_reference(contents) if contents.is_a? String
      new_contents = []
      changed = false
      contents.each do |block|
        if block[:type] == :span
          updated, ok = update_next_reference(block[:contents])
          if ok
            changed = true
            next new_contents.append(*updated)
          end
        end
        new_contents << block
      end
      [new_contents, changed]
    end
def update_next_reference ( contents ) return update_string_reference ( contents ) if contents . is_a? String new_contents = [ ] changed = false contents . each do | block | if block [ :type ] == :span updated , ok = update_next_reference ( block [ :contents ] ) if ok changed = true next new_contents . append ( * updated ) end end new_contents << block end [ new_contents , changed ] end
Internal: Recursivelly updates a given value until all references are
processed.
Internal : Recursivelly updates a given value until all references are processed .
contents