Class: RDocF95::Markup::Special

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc-f95/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.



80
81
82
# File 'lib/rdoc-f95/markup/inline.rb', line 80

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

Instance Attribute Details

#textObject

Returns the value of attribute text.



78
79
80
# File 'lib/rdoc-f95/markup/inline.rb', line 78

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type.



77
78
79
# File 'lib/rdoc-f95/markup/inline.rb', line 77

def type
  @type
end

Instance Method Details

#==(o) ⇒ Object



84
85
86
# File 'lib/rdoc-f95/markup/inline.rb', line 84

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

#inspectObject



88
89
90
91
# File 'lib/rdoc-f95/markup/inline.rb', line 88

def inspect
  "#<RDocF95::Markup::Special:0x%x @type=%p, name=%p @text=%p>" % [
    object_id, @type, RDocF95::Markup::Attribute.as_string(type), text.dump]
end

#to_sObject



93
94
95
# File 'lib/rdoc-f95/markup/inline.rb', line 93

def to_s
  "Special: type=#{type}, name=#{RDocF95::Markup::Attribute.as_string type}, text=#{text.dump}"
end