Class: FriendlyShipping::Timing
- Inherits:
-
Object
- Object
- FriendlyShipping::Timing
- Defined in:
- lib/friendly_shipping/timing.rb
Instance Attribute Summary collapse
-
#delivery ⇒ Object
readonly
Returns the value of attribute delivery.
-
#guaranteed ⇒ Object
readonly
Returns the value of attribute guaranteed.
-
#pickup ⇒ Object
readonly
Returns the value of attribute pickup.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#shipping_method ⇒ Object
readonly
Returns the value of attribute shipping_method.
Instance Method Summary collapse
-
#initialize(shipping_method:, pickup:, delivery:, guaranteed: false, properties: {}) ⇒ Timing
constructor
A new instance of Timing.
- #time_in_transit ⇒ Object
Constructor Details
#initialize(shipping_method:, pickup:, delivery:, guaranteed: false, properties: {}) ⇒ Timing
Returns a new instance of Timing.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/friendly_shipping/timing.rb', line 11 def initialize( shipping_method:, pickup:, delivery:, guaranteed: false, properties: {} ) @shipping_method = shipping_method @pickup = pickup @delivery = delivery @guaranteed = guaranteed @properties = properties end |
Instance Attribute Details
#delivery ⇒ Object (readonly)
Returns the value of attribute delivery.
5 6 7 |
# File 'lib/friendly_shipping/timing.rb', line 5 def delivery @delivery end |
#guaranteed ⇒ Object (readonly)
Returns the value of attribute guaranteed.
5 6 7 |
# File 'lib/friendly_shipping/timing.rb', line 5 def guaranteed @guaranteed end |
#pickup ⇒ Object (readonly)
Returns the value of attribute pickup.
5 6 7 |
# File 'lib/friendly_shipping/timing.rb', line 5 def pickup @pickup end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
5 6 7 |
# File 'lib/friendly_shipping/timing.rb', line 5 def properties @properties end |
#shipping_method ⇒ Object (readonly)
Returns the value of attribute shipping_method.
5 6 7 |
# File 'lib/friendly_shipping/timing.rb', line 5 def shipping_method @shipping_method end |
Instance Method Details
#time_in_transit ⇒ Object
25 26 27 |
# File 'lib/friendly_shipping/timing.rb', line 25 def time_in_transit delivery - pickup end |