Method: Curses::Menu#items
- Defined in:
- ext/curses/curses.c
#items ⇒ Object
call-seq:
items
Returns the items of the menu.
3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 |
# File 'ext/curses/curses.c', line 3456 static VALUE (VALUE obj) { struct *; ITEM **items; int count, i; VALUE ary; GetMENU(obj, ); items = (->); if (items == NULL) { return Qnil; } count = item_count(->); ary = rb_ary_new(); for (i = 0; i < count; i++) { rb_ary_push(ary, item_new(items[i])); } return ary; } |