Class: Mathemagical::SubSup
- Defined in:
- lib/mathemagical/element.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#sub ⇒ Object
Returns the value of attribute sub.
-
#sup ⇒ Object
Returns the value of attribute sup.
Attributes inherited from Element
#attributes, #children, #display_style, #name
Instance Method Summary collapse
-
#initialize(display_style, body) ⇒ SubSup
constructor
A new instance of SubSup.
Methods inherited from Element
#<<, #[], #[]=, #as_display_style, #build_attributes_string, #child_ml, #pop, #self_closing_xml, #to_s, #xml
Constructor Details
#initialize(display_style, body) ⇒ SubSup
Returns a new instance of SubSup.
144 145 146 147 148 |
# File 'lib/mathemagical/element.rb', line 144 def initialize(display_style, body) super("mrow") as_display_style if display_style @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
142 143 144 |
# File 'lib/mathemagical/element.rb', line 142 def body @body end |
#sub ⇒ Object
Returns the value of attribute sub.
142 143 144 |
# File 'lib/mathemagical/element.rb', line 142 def sub @sub end |
#sup ⇒ Object
Returns the value of attribute sup.
142 143 144 |
# File 'lib/mathemagical/element.rb', line 142 def sup @sup end |