Module: XMLRPC::ParserWriterChooseMixin
- Included in:
- BasicServer, Client, Marshal
- Defined in:
- lib/xmlrpc/utils.rb
Overview
Defines ParserWriterChooseMixin, which makes it possible to choose a different XMLWriter and/or XMLParser then the default one.
The Mixin is used in client.rb (class XMLRPC::Client) and server.rb (class XMLRPC::BasicServer)
Instance Method Summary collapse
-
#set_parser(parser) ⇒ Object
Sets the XMLParser to use for parsing XML documents.
-
#set_writer(writer) ⇒ Object
Sets the XMLWriter to use for generating XML output.
Instance Method Details
#set_parser(parser) ⇒ Object
Sets the XMLParser to use for parsing XML documents.
Should be an instance of a class from module XMLRPC::XMLParser.
If this method is not called, then XMLRPC::Config::DEFAULT_PARSER is used.
40 41 42 43 |
# File 'lib/xmlrpc/utils.rb', line 40 def set_parser(parser) @parser = parser self end |
#set_writer(writer) ⇒ Object
Sets the XMLWriter to use for generating XML output.
Should be an instance of a class from module XMLRPC::XMLWriter.
If this method is not called, then XMLRPC::Config::DEFAULT_WRITER is used.
30 31 32 33 |
# File 'lib/xmlrpc/utils.rb', line 30 def set_writer(writer) @create = Create.new(writer) self end |