Module: Mml::Configuration
- Defined in:
- lib/mml/configuration.rb
Constant Summary collapse
- SUPPORTED_TAGS =
%i[ mmultiscripts maligngroup malignmark munderover semantics mscarries mfraction mphantom menclose mlongdiv mpadded msubsup mscarry mfenced msgroup mglyph mstack munder mtable mstyle mspace msline merror msrow mfrac mover mroot mtext msqrt none mrow msub msup mi mo mn ms ].freeze
- COMMON_ATTRIBUTES_CLASSES =
%w[ MathWithNilNamespace MathWithNamespace Mmultiscripts Munderover Semantics Mscarries Mfraction Mlongdiv Mphantom Menclose Mfenced Mpadded Msubsup Msgroup Mscarry Munder Mstyle Mstack Merror Mover Mfrac Msrow Mroot Msqrt Mrow Msub Msup Mtd Ms ].freeze
Class Method Summary collapse
- .adapter ⇒ Object
- .adapter=(adapter) ⇒ Object
- .class_for(class_name) ⇒ Object
- .config ⇒ Object
- .config=(config) ⇒ Object
- .custom_models=(models_hash) ⇒ Object
Class Method Details
.adapter ⇒ Object
92 93 94 |
# File 'lib/mml/configuration.rb', line 92 def adapter Lutaml::Model::Config.xml_adapter end |
.adapter=(adapter) ⇒ Object
96 97 98 |
# File 'lib/mml/configuration.rb', line 96 def adapter=(adapter) Lutaml::Model::Config.xml_adapter_type = adapter.downcase end |
.class_for(class_name) ⇒ Object
100 101 102 |
# File 'lib/mml/configuration.rb', line 100 def class_for(class_name) config[class_name] end |
.config ⇒ Object
79 80 81 |
# File 'lib/mml/configuration.rb', line 79 def config @config ||= {} end |
.config=(config) ⇒ Object
83 84 85 |
# File 'lib/mml/configuration.rb', line 83 def config=(config) self.config.merge!(config) end |
.custom_models=(models_hash) ⇒ Object
87 88 89 90 |
# File 'lib/mml/configuration.rb', line 87 def custom_models=(models_hash) # { Mi => CustomMiClass, Mo => CustomMoClass } models_hash.each { |klass, model| klass.model(model) } end |