Class: Postmen::Shipment

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/postmen/shipment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Shipment

Returns a new instance of Shipment.



9
10
11
12
13
# File 'lib/postmen/shipment.rb', line 9

def initialize(options)
  @ship_from = options[:ship_from]
  @ship_to = options[:ship_to]
  @parcels = options[:parcels]
end

Instance Attribute Details

#parcelsObject (readonly)

Returns the value of attribute parcels.



5
6
7
# File 'lib/postmen/shipment.rb', line 5

def parcels
  @parcels
end

#ship_fromObject (readonly)

Returns the value of attribute ship_from.



5
6
7
# File 'lib/postmen/shipment.rb', line 5

def ship_from
  @ship_from
end

#ship_toObject (readonly)

Returns the value of attribute ship_to.



5
6
7
# File 'lib/postmen/shipment.rb', line 5

def ship_to
  @ship_to
end