Sha256: 5d2ee31e0c6a66177273c53af91dfdc242a1f2f2994bccc4ab7b83e2456c8c7a

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

require 'sax-machine'

module Correios
  module SRO
    class Object
      include SAXMachine

      element  :numero, :as => :number
      element  :erro,   :as => :error
      elements :evento, :as => :events, :class => Correios::SRO::Event

      def has_error?
        error != nil
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
correios-sro-xml-0.4.0 lib/correios/sro/object.rb