Module: Enumerable
- Defined in:
- lib/import_everything/ext.rb
Instance Method Summary collapse
Instance Method Details
#make_first ⇒ Object
73 74 75 76 |
# File 'lib/import_everything/ext.rb', line 73 def make_first h = group_by { |x| !!yield(x) } (h[true]||[]) + (h[false]||[]) end |
#make_last ⇒ Object
69 70 71 72 |
# File 'lib/import_everything/ext.rb', line 69 def make_last h = group_by { |x| !!yield(x) } (h[false]||[]) + (h[true]||[]) end |