mml 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f5cead9c67648d4832c53955d29c71ed5ce9effc4d949ec4fde1ef029e1c08
4
- data.tar.gz: 2223572c63e4cd432ce8f92e6e9174fac687f92b5a18d9f701cc501b8b3843b6
3
+ metadata.gz: 61f01527cff794e89026423ce41e07ec025df438d39c67695a30436e5891d501
4
+ data.tar.gz: 9e50cfa754f65d87509ba48daffe9ec1c595aa9265e7886a9a0c2adbe5a5cd5b
5
5
  SHA512:
6
- metadata.gz: 2ac0a7546e651f323eaad7e1a76899309bb0e8f1856de2b8f180d0d7b16666cbfddf89990d6256fc23ec796603e09ec902c4947e87ae3e646aa61ea42d867de0
7
- data.tar.gz: e3915cfc2aaae307091e797c2db31584047cf38bd26d8b205752fc82270cfeb4d7d528ee53db86b343e01cc8ec2787bb3de10ba6f5d6e8bac6988de0eb5fcc45
6
+ metadata.gz: 4edbb08f519dee18a3a06d10d57dec5ce7602000a6baa62a41c84ba0f3bba5ec286e3fbefe89375f12f2c874370fd8cb9a219a63bec2a65669c3657820071b5c
7
+ data.tar.gz: ccc67661fb1fbd4de41793847f127c896acace0384471d144847e329a220fd61c824181e0c844c31bba5c07ed2a7e89973b051d79eba729f3b447cd6621988fc
@@ -52,6 +52,11 @@ module Mml
52
52
  self.config.merge!(config)
53
53
  end
54
54
 
55
+ def custom_models=(models_hash)
56
+ # { Mi => CustomMiClass, Mo => CustomMoClass }
57
+ models_hash.each { |klass, model| klass.model(model) }
58
+ end
59
+
55
60
  def adapter
56
61
  Lutaml::Model::Config.xml_adapter
57
62
  end
data/lib/mml/maction.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Maction < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:maction)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :actiontype, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Maligngroup < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:maligngroup)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :groupalign, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Malignmark < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:malignmark)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :edge, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class MathWithNamespace < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:math)
6
-
7
5
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
8
6
  attribute :"#{tag}_value", Mml.const_get(tag.capitalize), collection: true
9
7
  end
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class MathWithNilNamespace < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:math)
6
-
7
5
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
8
6
  attribute :"#{tag}_value", Mml.const_get(tag.capitalize), collection: true
9
7
  end
data/lib/mml/menclose.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Menclose < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:menclose)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :notation, :string
data/lib/mml/merror.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Merror < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:merror)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :mathcolor, :string
9
7
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
data/lib/mml/mfenced.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mfenced < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mfenced)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :separators, :string
9
7
  attribute :mathcolor, :string
data/lib/mml/mfrac.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mfrac < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mfrac)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :linethickness, :string
data/lib/mml/mfraction.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mfraction < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mfraction)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :linethickness, :string
data/lib/mml/mglyph.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mglyph < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mglyph)
6
-
7
5
  attribute :alt, :string
8
6
  attribute :src, :string
9
7
  attribute :width, :string
data/lib/mml/mi.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mi < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mi)
6
-
7
5
  attribute :dir, :string
8
6
  attribute :value, :string
9
7
  attribute :color, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mlabeledtr < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mlabeledtr)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :columnalign, :string
9
7
  attribute :groupalign, :string
data/lib/mml/mlongdiv.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mlongdiv < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mlongdiv)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :longdivstyle, :string
9
7
  attribute :mathcolor, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mmultiscripts < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mmultiscripts)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :subscriptshift, :string
data/lib/mml/mn.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mn < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mn)
6
-
7
5
  attribute :value, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :mathbackground, :string
data/lib/mml/mo.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mo < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mo)
6
-
7
5
  attribute :value, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :mathbackground, :string
data/lib/mml/mover.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mover < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mover)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :accent, :string
data/lib/mml/mpadded.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mpadded < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mpadded)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :voffset, :string
data/lib/mml/mphantom.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mphantom < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mphantom)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mprescripts < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mprescripts)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
 
data/lib/mml/mroot.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mroot < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mroot)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
data/lib/mml/mrow.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mrow < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mrow)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :content, :string
data/lib/mml/ms.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Ms < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:ms)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :mathvariant, :string
9
7
  attribute :fontfamily, :string
@@ -19,7 +17,7 @@ module Mml
19
17
  attribute :value, :string
20
18
  attribute :dir, :string
21
19
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
22
- attribute :"#{tag}_value", Mml.const_get(tag.capitalize)
20
+ attribute :"#{tag}_value", Mml.const_get(tag.capitalize), collection: true
23
21
  end
24
22
 
25
23
  xml do
data/lib/mml/mscarries.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mscarries < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mscarries)
6
-
7
5
  attribute :scriptsizemultiplier, :integer
8
6
  attribute :mathbackground, :string
9
7
  attribute :mathcolor, :string
data/lib/mml/mscarry.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mscarry < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mscarry)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :location, :string
data/lib/mml/msgroup.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msgroup < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msgroup)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :position, :integer
data/lib/mml/msline.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msline < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msline)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :position, :integer
data/lib/mml/mspace.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mspace < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mspace)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :mathvariant, :string
data/lib/mml/msqrt.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msqrt < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msqrt)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
data/lib/mml/msrow.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msrow < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msrow)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :position, :integer
data/lib/mml/mstack.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mstack < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mstack)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :align, :string
data/lib/mml/mstyle.rb CHANGED
@@ -3,8 +3,6 @@
3
3
  module Mml
4
4
  # rubocop:disable Metrics/ClassLength
5
5
  class Mstyle < Lutaml::Model::Serializable
6
- model Mml::Configuration.class_for(:mstyle)
7
-
8
6
  attribute :mathcolor, :string
9
7
  attribute :mathbackground, :string
10
8
  attribute :scriptlevel, :integer
data/lib/mml/msub.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msub < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msub)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :subscriptshift, :string
9
7
  attribute :mathcolor, :string
data/lib/mml/msubsup.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msubsup < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msubsup)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :subscriptshift, :string
data/lib/mml/msup.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Msup < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:msup)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :superscriptshift, :string
data/lib/mml/mtable.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mtable < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mtable)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :align, :string
data/lib/mml/mtd.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mtd < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mtd)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :rowalign, :string
data/lib/mml/mtext.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mtext < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mtext)
6
-
7
5
  attribute :value, :string
8
6
  attribute :mathcolor, :string
9
7
  attribute :mathbackground, :string
data/lib/mml/mtr.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Mtr < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:mtr)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :rowalign, :string
data/lib/mml/munder.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Munder < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:munder)
6
-
7
5
  attribute :mathbackground, :string
8
6
  attribute :accentunder, :string
9
7
  attribute :mathcolor, :string
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Munderover < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:munderover)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
  attribute :accent, :string
data/lib/mml/none.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class None < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:none)
6
-
7
5
  attribute :mathcolor, :string
8
6
  attribute :mathbackground, :string
9
7
 
data/lib/mml/semantics.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  module Mml
4
4
  class Semantics < Lutaml::Model::Serializable
5
- model Mml::Configuration.class_for(:semantics)
6
-
7
5
  attribute :annotation, Mml::Mi, collection: true
8
6
  Mml::Configuration::SUPPORTED_TAGS.each do |tag|
9
7
  attribute :"#{tag}_value", Mml.const_get(tag.capitalize), collection: true
data/lib/mml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mml
4
- VERSION = "1.0.2"
4
+ VERSION = "2.0.0"
5
5
  end
data/mml.gemspec CHANGED
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_runtime_dependency "lutaml-model", "~> 0.5"
33
+ spec.add_runtime_dependency "lutaml-model"
34
34
  spec.add_runtime_dependency "zeitwerk"
35
35
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-28 00:00:00.000000000 Z
11
+ date: 2025-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.5'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement