Class: CTioga2::Commands::Documentation::MarkedUpText::MarkupVerbatim

Inherits:
MarkupItem
  • Object
show all
Defined in:
lib/ctioga2/commands/doc/markup.rb

Overview

A markup item representing verbatim text, with the given class

Instance Attribute Summary collapse

Attributes inherited from MarkupItem

#doc

Instance Method Summary collapse

Constructor Details

#initialize(doc, text, cls) ⇒ MarkupVerbatim

Returns a new instance of MarkupVerbatim.



91
92
93
94
95
# File 'lib/ctioga2/commands/doc/markup.rb', line 91

def initialize(doc, text, cls)
  super(doc)
  @text = text
  @cls = cls
end

Instance Attribute Details

#clsObject

The verbatim text class



89
90
91
# File 'lib/ctioga2/commands/doc/markup.rb', line 89

def cls
  @cls
end

#textObject

The text



86
87
88
# File 'lib/ctioga2/commands/doc/markup.rb', line 86

def text
  @text
end

Instance Method Details

#dump_stringObject



101
102
103
# File 'lib/ctioga2/commands/doc/markup.rb', line 101

def dump_string
  return "#{@cls}: #{@text}"
end

#to_sObject



97
98
99
# File 'lib/ctioga2/commands/doc/markup.rb', line 97

def to_s
  return text
end