Class: Array

Inherits:
Object show all
Defined in:
lib/hobosupport/array.rb

Instance Method Summary collapse

Instance Method Details

#*(rhs = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/hobosupport/array.rb', line 5

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

#drop_while!Object



13
14
15
16
17
18
# File 'lib/hobosupport/array.rb', line 13

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

#multiplyObject



3
# File 'lib/hobosupport/array.rb', line 3

alias_method :multiply, :*