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.



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

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

Instance Attribute Details

#clsObject

The verbatim text class



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

def cls
  @cls
end

#textObject

The text



84
85
86
# File 'lib/ctioga2/commands/doc/markup.rb', line 84

def text
  @text
end

Instance Method Details

#dump_stringObject



99
100
101
# File 'lib/ctioga2/commands/doc/markup.rb', line 99

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

#to_sObject



95
96
97
# File 'lib/ctioga2/commands/doc/markup.rb', line 95

def to_s
  return text
end