Method: HTML::Table::ColGroup#push
- Defined in:
- lib/html/colgroup.rb
#push(*args) ⇒ Object
This method has been redefined to only allow ColGroup::Col objects to be pushed onto a ColGroup instance.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/html/colgroup.rb', line 60 def push(*args) args.each do |obj| unless obj.kind_of?(Table::ColGroup::Col) msg = "Can only assign Col objects to ColGroup class" msg += ": " + obj.class.to_s raise TypeError, msg end super(obj) end end |