Class: Proc
- Inherits:
-
Object
- Object
- Proc
- Defined in:
- lib/alda-rb/patches.rb
Overview
Contains patches to Ruby’s core classes.
Instance Method Summary collapse
-
#*(n) ⇒ Object
:call-seq: proc * n -> n.
Instance Method Details
#*(n) ⇒ Object
:call-seq:
proc * n -> n
Runs self
for n
times.
221 222 223 224 225 226 227 |
# File 'lib/alda-rb/patches.rb', line 221 def * n if !lambda? || arity == 1 n.times &self else n.times { self.() } end end |