class CorreiosSigep::Models::LogisticReverse
Attributes
collect[RW]
recipient[RW]
Public Class Methods
build(&block)
click to toggle source
# File lib/correios_sigep/models/logistic_reverse.rb, line 8 def self.build(&block) instance = new instance.instance_eval(&block) instance end
new(options = {})
click to toggle source
# File lib/correios_sigep/models/logistic_reverse.rb, line 14 def initialize(options = {}) @collect = options[:collect] || Models::Collect.new @recipient = options[:recipient] || Models::Recipient.new end
Public Instance Methods
to_xml()
click to toggle source
# File lib/correios_sigep/models/logistic_reverse.rb, line 19 def to_xml builder = Nokogiri::XML::Builder.new do |xml| xml.root do Builders::XML::Recipient.new(xml, recipient).build_xml Builders::XML::Collect.new(xml, collect).build_xml end end builder.to_xml end