Module: HasManyPreventDups::Concat
- Defined in:
- lib/has_many_prevent_dups/concat.rb
Instance Method Summary collapse
Instance Method Details
#<<(*records) ⇒ Object
4 5 6 |
# File 'lib/has_many_prevent_dups/concat.rb', line 4 def <<(*records) super(records.flatten.reject{|r| include?(r) }) end |
#concat(*records) ⇒ Object
9 10 11 |
# File 'lib/has_many_prevent_dups/concat.rb', line 9 def concat(*records) self << records end |
#push(*records) ⇒ Object
14 15 16 |
# File 'lib/has_many_prevent_dups/concat.rb', line 14 def push(*records) self << records end |