123456789_123456789_123456789_123456789_123456789_

Class: RDoc::Markup::Special

Relationships & Source Files
Inherits: Object
Defined in: lib/rdoc/markup/special.rb

Overview

Hold details of a special sequence

Class Method Summary

Instance Attribute Summary

Instance Method Summary

  • #==(o)

    Specials are equal when the have the same text and type.

Constructor Details

.new(type, text) ⇒ Special

Creates a new special sequence of #type with #text

[ GitHub ]

  
# File 'lib/rdoc/markup/special.rb', line 19

def initialize(type, text)
  @type, @text = type, text
end

Instance Attribute Details

#text (rw)

Special text

[ GitHub ]

  
# File 'lib/rdoc/markup/special.rb', line 14

attr_accessor :text

#type (readonly)

Special type

[ GitHub ]

  
# File 'lib/rdoc/markup/special.rb', line 9

attr_reader   :type

Instance Method Details

#==(o)

Specials are equal when the have the same text and type

[ GitHub ]

  
# File 'lib/rdoc/markup/special.rb', line 26

def ==(o)
  self.text == o.text && self.type == o.type
end