Class: MathML::SubSup

Inherits:
Element show all
Defined in:
lib/math_ml.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#display_style

Instance Method Summary collapse

Methods inherited from Element

#<<, #as_display_style

Methods inherited from XMLElement

#pop

Constructor Details

#initialize(display_style, body) ⇒ SubSup

Returns a new instance of SubSup.



118
119
120
121
122
123
124
# File 'lib/math_ml.rb', line 118

def initialize(display_style, body)
	super("mrow")
	as_display_style if display_style
	@body = body

	update_name
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



116
117
118
# File 'lib/math_ml.rb', line 116

def body
  @body
end

#subObject

Returns the value of attribute sub.



116
117
118
# File 'lib/math_ml.rb', line 116

def sub
  @sub
end

#supObject

Returns the value of attribute sup.



116
117
118
# File 'lib/math_ml.rb', line 116

def sup
  @sup
end

Instance Method Details

#to_xml_with_indent(dst = String.new, level = 0, is_head = true) ⇒ Object



156
157
158
159
# File 'lib/math_ml.rb', line 156

def to_xml_with_indent(dst=String.new, level=0, is_head=true)
	update_contents
	super
end