Method: Megam::DiscountsCollection#<<
- Defined in:
- lib/megam/core/discounts_collection.rb
#<<(*args) ⇒ Object Also known as: push
41 42 43 44 45 46 47 48 |
# File 'lib/megam/core/discounts_collection.rb', line 41 def <<(*args) args.flatten.each do |a| is_megam_discounts(a) @discounts << a @discounts_by_name[a.code] =@discounts.length - 1 end self end |