Class: MDOM::Text

Inherits:
InlineNode show all
Defined in:
lib/mdom/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#attributes, #children, #parent, #type

Instance Method Summary collapse

Methods inherited from Node

#[], #ancestors, #append, #children?, #depth, #each_child, #empty?, #find, #find_all, #insert_after, #insert_before, #inspect, #plain_text, #pretty_print, #remove, #replace, #root, #text?, #to_markdown, #walk

Constructor Details

#initialize(value) ⇒ Text

Returns a new instance of Text.



129
130
131
132
# File 'lib/mdom/nodes.rb', line 129

def initialize(value)
  @value = value
  super(Types::TEXT)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



134
135
136
# File 'lib/mdom/nodes.rb', line 134

def value
  @value
end

Instance Method Details

#to_sObject



136
137
138
# File 'lib/mdom/nodes.rb', line 136

def to_s
  @value
end