class Emarsys::Broadcast::XmlBuilder
Public Instance Methods
import_xml(remote_path)
click to toggle source
# File lib/emarsys/broadcast/xml_builder.rb, line 7 def import_xml(remote_path) xml = Nokogiri::XML::Builder.new do |xml| xml.importRequest { xml.filePath remote_path } end xml.to_xml end
sender_xml(sender)
click to toggle source
# File lib/emarsys/broadcast/xml_builder.rb, line 16 def sender_xml(sender) xml = Nokogiri::XML::Builder.new do |xml| xml.sender { xml.name sender.name xml.address sender.address } end xml.to_xml end
Private Instance Methods
validate_options(options)
click to toggle source
# File lib/emarsys/broadcast/xml_builder.rb, line 28 def validate_options(options) raise ArgumentError, 'options can not be nil' unless options raise ArgumentError, 'name is required' unless string_present? options[:name] end