Class: FlexArray::ForEver
- 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
-
#times(&block) ⇒ Object
Do something until false == true ;-).
-
#to_i ⇒ Object
Convert an eternity into an integer.
Instance Method Details
#times(&block) ⇒ Object
Do something until false == true ;-)
8 9 10 |
# File 'lib/flex_array/flex_array_forever.rb', line 8 def times(&block) loop {block.call} end |
#to_i ⇒ Object
Convert an eternity into an integer. ;-)
13 14 15 |
# File 'lib/flex_array/flex_array_forever.rb', line 13 def to_i nil end |