mml 1.0.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mml/configuration.rb +5 -0
  3. data/lib/mml/maction.rb +0 -2
  4. data/lib/mml/maligngroup.rb +0 -2
  5. data/lib/mml/malignmark.rb +0 -2
  6. data/lib/mml/math_with_namespace.rb +0 -2
  7. data/lib/mml/math_with_nil_namespace.rb +0 -2
  8. data/lib/mml/menclose.rb +0 -2
  9. data/lib/mml/merror.rb +0 -2
  10. data/lib/mml/mfenced.rb +0 -2
  11. data/lib/mml/mfrac.rb +0 -2
  12. data/lib/mml/mfraction.rb +0 -2
  13. data/lib/mml/mglyph.rb +0 -2
  14. data/lib/mml/mi.rb +0 -2
  15. data/lib/mml/mlabeledtr.rb +0 -2
  16. data/lib/mml/mlongdiv.rb +0 -2
  17. data/lib/mml/mmultiscripts.rb +0 -2
  18. data/lib/mml/mn.rb +0 -2
  19. data/lib/mml/mo.rb +0 -2
  20. data/lib/mml/mover.rb +0 -2
  21. data/lib/mml/mpadded.rb +0 -2
  22. data/lib/mml/mphantom.rb +0 -2
  23. data/lib/mml/mprescripts.rb +0 -2
  24. data/lib/mml/mroot.rb +0 -2
  25. data/lib/mml/mrow.rb +0 -2
  26. data/lib/mml/ms.rb +1 -3
  27. data/lib/mml/mscarries.rb +0 -2
  28. data/lib/mml/mscarry.rb +0 -2
  29. data/lib/mml/msgroup.rb +0 -2
  30. data/lib/mml/msline.rb +0 -2
  31. data/lib/mml/mspace.rb +0 -2
  32. data/lib/mml/msqrt.rb +0 -2
  33. data/lib/mml/msrow.rb +0 -2
  34. data/lib/mml/mstack.rb +0 -2
  35. data/lib/mml/mstyle.rb +0 -2
  36. data/lib/mml/msub.rb +0 -2
  37. data/lib/mml/msubsup.rb +0 -2
  38. data/lib/mml/msup.rb +0 -2
  39. data/lib/mml/mtable.rb +0 -2
  40. data/lib/mml/mtd.rb +0 -2
  41. data/lib/mml/mtext.rb +0 -2
  42. data/lib/mml/mtr.rb +0 -2
  43. data/lib/mml/munder.rb +0 -2
  44. data/lib/mml/munderover.rb +0 -2
  45. data/lib/mml/none.rb +0 -2
  46. data/lib/mml/semantics.rb +0 -2
  47. data/lib/mml/version.rb +1 -1
  48. data/lib/mml.rb +34 -2
  49. data/mml.gemspec +1 -1
  50. metadata +6 -7
  51. data/lib/mml/mml.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f5cead9c67648d4832c53955d29c71ed5ce9effc4d949ec4fde1ef029e1c08
4
- data.tar.gz: 2223572c63e4cd432ce8f92e6e9174fac687f92b5a18d9f701cc501b8b3843b6
3
+ metadata.gz: 4edc2cd98bf5ea40cd990bc2f7de88334fda8964d0d50b5c7a3347624276dca6
4
+ data.tar.gz: aaec60ab3f027aa98e7f1bc8690551714414f463802cd981c6f724da8c4c8e9a
5
5
  SHA512:
6
- metadata.gz: 2ac0a7546e651f323eaad7e1a76899309bb0e8f1856de2b8f180d0d7b16666cbfddf89990d6256fc23ec796603e09ec902c4947e87ae3e646aa61ea42d867de0
7
- data.tar.gz: e3915cfc2aaae307091e797c2db31584047cf38bd26d8b205752fc82270cfeb4d7d528ee53db86b343e01cc8ec2787bb3de10ba6f5d6e8bac6988de0eb5fcc45
6
+ metadata.gz: d6db4bcf4ae1dd66116a5e6e5a90915f2e03ccf205840752fcf682f693e0078a46a38a89f5fa7178101d2fa0400c4638d3afda8561ecc6cdd7ec04f75b5b7b6f
7
+ data.tar.gz: 412834bc7a1872505e480d35c01a58c35cde48eeac5525239d6da2d0622e67597a2735ada95baf0f9fa77c4155c330e8597b98b960282e364d3399a8f5de37d3
@@ -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.1"
5
5
  end
data/lib/mml.rb CHANGED
@@ -2,8 +2,40 @@
2
2
 
3
3
  require "zeitwerk"
4
4
  require "lutaml/model"
5
- require_relative "mml/mml"
5
+
6
+ DEFAULT_ADAPTER = if RUBY_ENGINE == "opal"
7
+ require "lutaml/model/xml_adapter/oga_adapter"
8
+ :oga
9
+ else
10
+ require "lutaml/model/xml_adapter/ox_adapter"
11
+ :ox
12
+ end
6
13
 
7
14
  loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
8
- loader.ignore("#{__dir__}/lib/mml.rb")
9
15
  loader.setup
16
+
17
+ module Mml
18
+ class Error < StandardError; end
19
+
20
+ module_function
21
+
22
+ def config
23
+ Configuration.config
24
+ end
25
+
26
+ def parse(input, namespace_exist: true)
27
+ Configuration.adapter = DEFAULT_ADAPTER unless Configuration.adapter
28
+
29
+ if namespace_exist
30
+ Mml::MathWithNamespace.from_xml(input)
31
+ else
32
+ Mml::MathWithNilNamespace.from_xml(input)
33
+ end
34
+ end
35
+ end
36
+
37
+ begin
38
+ loader.eager_load(force: true)
39
+ rescue Zeitwerk::NameError => e
40
+ flunk e.message
41
+ 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.1
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-22 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
@@ -74,7 +74,6 @@ files:
74
74
  - lib/mml/mi.rb
75
75
  - lib/mml/mlabeledtr.rb
76
76
  - lib/mml/mlongdiv.rb
77
- - lib/mml/mml.rb
78
77
  - lib/mml/mmultiscripts.rb
79
78
  - lib/mml/mn.rb
80
79
  - lib/mml/mo.rb
data/lib/mml/mml.rb DELETED
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- DEFAULT_ADAPTER = if RUBY_ENGINE == "opal"
4
- require "lutaml/model/xml_adapter/oga_adapter"
5
- :oga
6
- else
7
- require "lutaml/model/xml_adapter/ox_adapter"
8
- :ox
9
- end
10
-
11
- module Mml
12
- class Error < StandardError; end
13
-
14
- module_function
15
-
16
- def config
17
- Configuration.config
18
- end
19
-
20
- def parse(input, namespace_exist: true)
21
- Configuration.adapter = DEFAULT_ADAPTER unless Configuration.adapter
22
-
23
- if namespace_exist
24
- Mml::MathWithNamespace.from_xml(input)
25
- else
26
- Mml::MathWithNilNamespace.from_xml(input)
27
- end
28
- end
29
- end