Class: AndParcel::ParcelSet
- Inherits:
-
Object
- Object
- AndParcel::ParcelSet
- Defined in:
- lib/andparcel/parcel.rb
Instance Method Summary collapse
- #<<(parcel) ⇒ Object
-
#initialize(root) ⇒ ParcelSet
constructor
A new instance of ParcelSet.
- #size ⇒ Object
Constructor Details
#initialize(root) ⇒ ParcelSet
75 76 77 78 |
# File 'lib/andparcel/parcel.rb', line 75 def initialize(root) @root=root @parcels=[] end |
Instance Method Details
#<<(parcel) ⇒ Object
80 81 82 |
# File 'lib/andparcel/parcel.rb', line 80 def <<(parcel) @parcels << Parcel.new(parcel) end |
#size ⇒ Object
84 85 86 |
# File 'lib/andparcel/parcel.rb', line 84 def size @parcels.size end |