Class: SM::Special

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/markup/simple_markup/inline.rb

Overview

Hold details of a special sequence

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, text) ⇒ Special

Returns a new instance of Special.



75
76
77
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 75

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

Instance Attribute Details

#textObject

Returns the value of attribute text



73
74
75
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 73

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type



72
73
74
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 72

def type
  @type
end

Instance Method Details

#==(o) ⇒ Object



79
80
81
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 79

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

#to_sObject



83
84
85
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 83

def to_s
  "Special: type=#{type}, text=#{text.dump}"
end