Module: Mml::Base::Mglyph
- Included in:
- V2::Mglyph, V3::Mglyph, V4::Mglyph
- Defined in:
- lib/mml/base/mglyph.rb
Class Method Summary collapse
-
.included(klass) ⇒ Object
NOTE: class_eval resolves constants in module’s lexical scope.
Class Method Details
.included(klass) ⇒ Object
NOTE: class_eval resolves constants in module’s lexical scope. Use fully qualified names (e.g., Mml::Namespace).
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/mml/base/mglyph.rb', line 8 def self.included(klass) klass.class_eval do attribute :alt, :string attribute :src, :string attribute :width, :string attribute :index, :integer attribute :height, :string attribute :valign, :string attribute :mathvariant, :string attribute :mathbackground, :string attribute :fontfamily, :string attribute :mathcolor, :string xml do namespace Mml::Namespace element "mglyph" map_attribute "src", to: :src map_attribute "alt", to: :alt map_attribute "index", to: :index map_attribute "width", to: :width map_attribute "height", to: :height map_attribute "valign", to: :valign map_attribute "mathvariant", to: :mathvariant map_attribute "mathbackground", to: :mathbackground map_attribute "fontfamily", to: :fontfamily map_attribute "mathcolor", to: :mathcolor end end end |