Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/one_touch/models/array.rb
Instance Method Summary collapse
-
#each_relations_on(element, mark) ⇒ Object
return a Hash.
Instance Method Details
#each_relations_on(element, mark) ⇒ Object
return a Hash
4 5 6 7 8 9 |
# File 'lib/one_touch/models/array.rb', line 4 def each_relations_on(element,mark) select {|e| e != element }.inject({}) do |memo,record| memo.merge!({record => mark}) unless memo.keys.include? record memo end end |