Sha256: 9e676653d72b0ddc4397d0210dcd54514431ce974f1ec9d5f64851c3e5ff2f0d
Contents?: true
Size: 674 Bytes
Versions: 19
Compression:
Stored size: 674 Bytes
Contents
class Adaptation::Adaptor def publish *options message_object = nil if options.first.is_a?(Adaptation::Message) message_object = options.first elsif options.first.is_a?(String) xml_message = options.first message_type = xml_message[1..(xml_message.index(/(>| )/) - 1)] message_class = get_class_object(message_type.capitalize) message_object = message_class.to_object(xml_message) end mom = File.new(File.dirname(__FILE__) + '/mom.txt', "a") mom.write("#{message_object.to_xml.to_s}\n") mom.close # configuration = {} # configuration.update(options.pop) if options.last.is_a?(Hash) end end
Version data entries
19 entries across 19 versions & 1 rubygems