class Array

Public Class Methods

from_generator(proc) click to toggle source
# File lib/xmigra.rb, line 31
def Array.from_generator(proc)
  result = new
  proc.call {|item| result << item}
  return result
end

Public Instance Methods

insert_after(element, new_element) click to toggle source
# File lib/xmigra.rb, line 38
def insert_after(element, new_element)
  insert(index(element) + 1, new_element)
end