Class: FlexArray::ForEver

Inherits:
Object show all
Defined in:
lib/flex_array/flex_array_forever.rb

Overview

A helper class that encapsulates the idea of looping without end!

Instance Method Summary collapse

Instance Method Details

#times(&block) ⇒ Object

Do something until false == true ;-)



6
7
8
# File 'lib/flex_array/flex_array_forever.rb', line 6

def times(&block)
  loop {block.call}
end

#to_iObject

Convert an eternity into an integer. ;-)



11
12
13
# File 'lib/flex_array/flex_array_forever.rb', line 11

def to_i
  nil
end