Class: List
- Inherits:
-
Array
- Object
- Array
- List
- Defined in:
- lib/methodic.rb
Overview
inherited List class from Array to patch push for uniqness carateristique
Instance Method Summary collapse
-
#<<(*value) ⇒ Object
override of << for uniqness and flatten return.
-
#push(*value) ⇒ Object
override of push for uniqness and flatten return.
Instance Method Details
#<<(*value) ⇒ Object
override of << for uniqness and flatten return
24 25 26 27 28 29 |
# File 'lib/methodic.rb', line 24 def <<(*value) super(value) self.flatten! self.uniq! return self end |
#push(*value) ⇒ Object
override of push for uniqness and flatten return
15 16 17 18 19 20 |
# File 'lib/methodic.rb', line 15 def push(*value) super(value) self.flatten! self.uniq! return self end |