Class: MDOM::Code

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) ⇒ Code

Returns a new instance of Code.



154
155
156
157
# File 'lib/mdom/nodes.rb', line 154

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



159
160
161
# File 'lib/mdom/nodes.rb', line 159

def value
  @value
end

Instance Method Details

#to_sObject



161
162
163
# File 'lib/mdom/nodes.rb', line 161

def to_s
  @value
end