Sha256: a768353206db29ea016566006fe4fed171866aa2923e4ed2d9e0c09c23ca6696

Contents?: true

Size: 277 Bytes

Versions: 11

Compression:

Stored size: 277 Bytes

Contents

class Array

  alias_method :multiply, :*

  def *(rhs=nil)
    if rhs
      multiply(rhs)
    else
      Enumerable::MultiSender.new(self, :map)
    end
  end

  def drop_while!
    drop = 0
    drop += 1 while yield(self[drop])
    self[0..drop-1] = []
    self
  end

end


Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hobosupport-0.8.10 lib/hobo_support/array.rb
hobosupport-0.8.9 lib/hobo_support/array.rb
hobosupport-0.8.8 lib/hobo_support/array.rb
hobosupport-0.8.3 lib/hobosupport/array.rb
hobosupport-0.8 lib/hobosupport/array.rb
hobosupport-0.8.5 lib/hobo_support/array.rb
hobosupport-0.8.6 lib/hobo_support/array.rb
hobosupport-0.8.7 lib/hobo_support/array.rb
hobosupport-0.8.4 lib/hobo_support/array.rb
hobosupport-0.8.1 lib/hobosupport/array.rb
hobosupport-0.8.2 lib/hobosupport/array.rb