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

[Source]

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

Public Instance methods

[Source]

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

[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]

ruby-doc.org is a community service provided by James Britt and Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.