Module: Mml::Configuration
- Defined in:
- lib/mml/configuration.rb
Constant Summary collapse
- SUPPORTED_TAGS =
%w[ 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
Class Method Summary collapse
- .adapter ⇒ Object
- .adapter=(adapter) ⇒ Object
- .class_for(class_name) ⇒ Object
- .config ⇒ Object
- .config=(config) ⇒ Object
Class Method Details
.adapter ⇒ Object
55 56 57 |
# File 'lib/mml/configuration.rb', line 55 def adapter Lutaml::Model::Config.xml_adapter end |
.adapter=(adapter) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/mml/configuration.rb', line 59 def adapter=(adapter) Lutaml::Model::Config.configure do |config| require "lutaml/model/xml_adapter/#{adapter.downcase}_adapter" config.xml_adapter = Lutaml::Model::XmlAdapter.const_get("#{adapter.to_s.capitalize}Adapter") end end |
.class_for(class_name) ⇒ Object
66 67 68 |
# File 'lib/mml/configuration.rb', line 66 def class_for(class_name) config[class_name] end |
.config ⇒ Object
47 48 49 |
# File 'lib/mml/configuration.rb', line 47 def config @config ||= {} end |
.config=(config) ⇒ Object
51 52 53 |
# File 'lib/mml/configuration.rb', line 51 def config=(config) self.config.merge!(config) end |