Sha256: 55581e168e0714adb75652cc1dc2897e0ab86722e95991f9113124c703507519

Contents?: true

Size: 439 Bytes

Versions: 3

Compression:

Stored size: 439 Bytes

Contents

class Integer {
  # common ruby-forwarding methods used by Fixnum & Bignum classes

  def times: block {
    """
    @block @Block@ to be called with each number between 0 and @self.
    @return @self

    Calls a given @Block@ with each number between 0 and @self.
    """

    try {
      times(&block)
    } catch Fancy BreakIteration => b {
      return b result
    } catch Fancy StopIteration => s {
      return s result
    }
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fancy-0.7.0 lib/rbx/integer.fy
fancy-0.6.0 lib/rbx/integer.fy
fancy-0.5.0 lib/rbx/integer.fy