Class: Postmen::Parcel

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Parcel

Returns a new instance of Parcel.



11
12
13
14
15
16
17
# File 'lib/postmen/parcel.rb', line 11

def initialize(options)
  @box_type = options[:box_type]
  @dimension = options[:dimension]
  @items = options[:items]
  @description = options[:description]
  @weight = options[:weight]
end

Instance Attribute Details

#box_typeObject (readonly)

Returns the value of attribute box_type.



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

def box_type
  @box_type
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#dimensionObject (readonly)

Returns the value of attribute dimension.



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

def dimension
  @dimension
end

#itemsObject (readonly)

Returns the value of attribute items.



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

def items
  @items
end

#weightObject (readonly)

Returns the value of attribute weight.



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

def weight
  @weight
end