Class: ActiveMerchant::Shipping::ShipmentEvent
- Defined in:
- lib/active_shipping/shipping/shipment_event.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #delivered? ⇒ Boolean
-
#initialize(name, time, location, message = nil) ⇒ ShipmentEvent
constructor
A new instance of ShipmentEvent.
- #status ⇒ Object
Constructor Details
#initialize(name, time, location, message = nil) ⇒ ShipmentEvent
6 7 8 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 6 def initialize(name, time, location, = nil) @name, @time, @location, = name, time, location, end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
4 5 6 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 4 def location @location end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 4 def end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 4 def name @name end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
4 5 6 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 4 def time @time end |
Instance Method Details
#delivered? ⇒ Boolean
10 11 12 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 10 def delivered? status == :delivered end |
#status ⇒ Object
14 15 16 |
# File 'lib/active_shipping/shipping/shipment_event.rb', line 14 def status @status ||= name.downcase.gsub("\s", "_").to_sym end |