Class: RubyExts::UniqueArray

Inherits:
Array show all
Defined in:
lib/rubyexts/unique_array.rb

Instance Method Summary collapse

Methods inherited from Array

#only, #rand

Instance Method Details

#push(*args) ⇒ Object Also known as: <<



7
8
9
10
11
12
13
# File 'lib/rubyexts/unique_array.rb', line 7

def push(*args)
  args.each do |arg|
    unless self.include?(arg)
      super(arg)
    end
  end
end