Method: Vinery::Collection#add
- Defined in:
- lib/vinery/collection.rb
#add(record) ⇒ Object Also known as: <<
Public: Appends a new Record to the end of a Collection.
record - The Record to be appended to the end of the Collection.
Examples
collection.push(record)
Returns the array of Records.
24 25 26 27 |
# File 'lib/vinery/collection.rb', line 24 def add(record) raise TypeError, "the object you're tyring to add is not a Record" unless record.is_a? Record super(record) end |