DataMapper::Serializer::XML

Constants

SERIALIZERS

The supported XML Serializers

Public Class Methods

serializer() click to toggle source

The current XML Serializer.

@return [Module]

The module within {DataMapper::Serialize::XML}.

@since 1.1.0

# File lib/dm-serializer/xml.rb, line 19
def self.serializer
  @serializer
end
serializer=(name) click to toggle source

Sets the XML Serializer to use.

@param [Symbol] name

The name of the serializer to use. Must be either `:libxml`,
`:nokogiri` or `:rexml`.

@return [Module]

The module within {DataMapper::Serialize::XML}.

@since 1.1.0

# File lib/dm-serializer/xml.rb, line 35
def self.serializer=(name)
  serializer_const = SERIALIZERS[name]

  unless serializer_const
    raise(ArgumentError,"unsupported XML Serializer #{name}")
  end

  require "dm-serializer/xml/#{name}"
  @serializer = const_get(serializer_const)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.