Module: Moxml::Adapter

Defined in:
lib/moxml/adapter.rb,
lib/moxml/adapter/ox.rb,
lib/moxml/adapter/oga.rb,
lib/moxml/adapter/base.rb,
lib/moxml/adapter/rexml.rb,
lib/moxml/adapter/nokogiri.rb,
lib/moxml/adapter/customized_ox/text.rb,
lib/moxml/adapter/customized_ox/attribute.rb,
lib/moxml/adapter/customized_ox/namespace.rb,
lib/moxml/adapter/customized_rexml/formatter.rb,
lib/moxml/adapter/customized_oga/xml_generator.rb,
lib/moxml/adapter/customized_oga/xml_declaration.rb

Defined Under Namespace

Modules: CustomizedOga, CustomizedOx, CustomizedRexml Classes: Base, Nokogiri, Oga, Ox, Rexml

Constant Summary collapse

AVALIABLE_ADAPTERS =
%i[nokogiri oga rexml ox].freeze

Class Method Summary collapse

Class Method Details

.load(name) ⇒ Object



10
11
12
13
14
15
# File 'lib/moxml/adapter.rb', line 10

def load(name)
  require_adapter(name)
  const_get(name.to_s.capitalize)
rescue LoadError => e
  raise LoadError, "Could not load #{name} adapter. Please ensure the #{name} gem is available: #{e.message}"
end