Class: SM::AttrSpan

Class | SM::AttrSpan
In: | rdoc/markup/simple_markup/inline.rb
Parent: | Object

An array of attributes which parallels the characters in a string

### Methods

[] new set_attrs

### Public Class methods

new(length)

[Source]

    # File rdoc/markup/simple_markup/inline.rb, line 53
        def initialize(length)
          @attrs = Array.new(length, 0)
        end

### Public Instance methods

[](n)

[Source]

    # File rdoc/markup/simple_markup/inline.rb, line 63
        def [](n)
          @attrs[n]
        end

set_attrs(start, length, bits)

[Source]

    # File rdoc/markup/simple_markup/inline.rb, line 57
        def set_attrs(start, length, bits)
          for i in start ... (start+length)
            @attrs[i] |= bits
          end
        end

[Validate]