Sha256: c404c937b89f6f31067be05234fba7c0654201b35a31e17e46d6e8a1c90ee559

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Shipping
    class ShipmentEvent
      attr_reader :name, :time, :location, :message

      def initialize(name, time, location, message = nil)
        @name, @time, @location, @message = name, time, location, message
      end

      def delivered?
        status == :delivered
      end

      def status
        @status ||= name.downcase.gsub("\s", "_").to_sym
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_shipping-0.12.6 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.12.5 lib/active_shipping/shipping/shipment_event.rb