Module: Mml::Base::Msline

Included in:
V2::Msline, V3::Msline, V4::Msline
Defined in:
lib/mml/base/msline.rb

Class Method Summary collapse

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
# File 'lib/mml/base/msline.rb', line 8

def self.included(klass)
  klass.class_eval do
    attribute :mathcolor, :string
    attribute :mathbackground, :string
    attribute :position, :integer
    attribute :length, :integer
    attribute :leftoverhang, :string
    attribute :rightoverhang, :string
    attribute :mslinethickness, :string

    xml do
      namespace Mml::Namespace
      element "msline"

      map_attribute "mathcolor", to: :mathcolor
      map_attribute "mathbackground", to: :mathbackground
      map_attribute "position", to: :position
      map_attribute "length", to: :length
      map_attribute "leftoverhang", to: :leftoverhang
      map_attribute "rightoverhang", to: :rightoverhang
      map_attribute "mslinethickness", to: :mslinethickness
    end
  end
end