Class: Wikitree::Text

Inherits:
Node
  • Object
show all
Defined in:
lib/wikitree/nodes.rb

Overview

Text run/segement

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Text

Returns a new instance of Text.



11
12
13
# File 'lib/wikitree/nodes.rb', line 11

def initialize( text )
  @text = text
end

Instance Method Details

#inspectObject



21
22
23
# File 'lib/wikitree/nodes.rb', line 21

def inspect
  @text.inspect
end

#to_textObject



15
16
17
18
# File 'lib/wikitree/nodes.rb', line 15

def to_text
  ## todo: fix remove possible html stuff - why? why not?

  @text
end

#to_wikiObject



19
# File 'lib/wikitree/nodes.rb', line 19

def to_wiki() @text; end