Flowdock
method

update_attributes

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: HtmlFormatter
update_attributes(current, wanted) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/ri/formatter.rb, line 538
  def update_attributes(current, wanted)
    str = ""
    # first turn off unwanted ones
    off = current & ~wanted
    for quality in [ BOLD, ITALIC, CODE]
      if (off & quality) > 0
        str << "</" + ATTR_MAP[quality]
      end
    end

    # now turn on wanted
    for quality in [ BOLD, ITALIC, CODE]
      unless (wanted & quality).zero?
        str << "<" << ATTR_MAP[quality]
      end
    end
    @output.print str
  end
Register or log in to add new notes.