Method: MenuWindow#move_to_next_item_in_set

Defined in:
lib/menu_window.rb

#move_to_next_item_in_set(set) ⇒ Object

set is a set of indexes to the original larger set



285
286
287
288
289
290
291
292
293
294
# File 'lib/menu_window.rb', line 285

def move_to_next_item_in_set(set)
  LOGGER.debug("set : #{set}")
  LOGGER.debug("@current_index : #{@current_index}")
  current_index = set.index( @current_index )
  # move arrow, or change page
  return if current_index == set.length - 1
  LOGGER.debug("current_index : #{current_index}")
  new_index = set[current_index + 1]
  move_to_item(new_index)
end