Sha256: 23529579675a3856f2371e3e32e2127bf5fca4007425e51daa5a034c4c6a6327

Contents?: true

Size: 448 Bytes

Versions: 7

Compression:

Stored size: 448 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

7 entries across 7 versions & 1 rubygems

Version Path
active_shipping-0.12.4 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.12.3 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.12.2 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.12.1 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.12.0 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.11.2 lib/active_shipping/shipping/shipment_event.rb
active_shipping-0.11.1 lib/active_shipping/shipping/shipment_event.rb