Class: SM::Special
- Inherits:
-
Object
- Object
- SM::Special
- Defined in:
- lib/rdoc/markup/simple_markup/inline.rb
Overview
Hold details of a special sequence
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(type, text) ⇒ Special
constructor
A new instance of Special.
- #to_s ⇒ Object
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
#text ⇒ Object
Returns the value of attribute text
73 74 75 |
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 73 def text @text end |
#type ⇒ Object (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_s ⇒ Object
83 84 85 |
# File 'lib/rdoc/markup/simple_markup/inline.rb', line 83 def to_s "Special: type=#{type}, text=#{text.dump}" end |