Class: Mathemagical::Math

Inherits:
Element
  • Object
show all
Defined in:
lib/mathemagical/element.rb

Instance Attribute Summary

Attributes inherited from Element

#attributes, #children, #display_style, #name

Instance Method Summary collapse

Methods inherited from Element

#<<, #[], #[]=, #as_display_style, #build_attributes_string, #child_ml, #pop, #self_closing_xml, #to_s, #xml

Constructor Details

#initialize(display_style) ⇒ Math

Returns a new instance of Math.



83
84
85
86
# File 'lib/mathemagical/element.rb', line 83

def initialize(display_style)
	super("math", "xmlns"=>"http://www.w3.org/1998/Math/MathML")
	self[:display] = display_style ? "block" : "inline"
end