Class: Khaleesi::Array
- Inherits:
-
Array
- Object
- Array
- Khaleesi::Array
- Defined in:
- lib/khaleesi/generator.rb
Instance Method Summary collapse
Instance Method Details
#next(index) ⇒ Object
627 628 629 630 |
# File 'lib/khaleesi/generator.rb', line 627 def next(index) index += 1 index < size ? at(index) : nil end |
#prev(index) ⇒ Object
631 632 633 |
# File 'lib/khaleesi/generator.rb', line 631 def prev(index) index > 0 ? at(index - 1) : nil end |