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
19:       def self.serializer
20:         @serializer
21:       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
35:       def self.serializer=(name)
36:         serializer_const = SERIALIZERS[name]
37: 
38:         unless serializer_const
39:           raise(ArgumentError,"unsupported XML Serializer #{name}")
40:         end
41: 
42:         require "dm-serializer/xml/#{name}"
43:         @serializer = const_get(serializer_const)
44:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.