Class: Waiter::Menu::ItemList
- Inherits:
-
Array
- Object
- Array
- Waiter::Menu::ItemList
- Defined in:
- lib/waiter/menu/item_list.rb
Instance Method Summary collapse
Instance Method Details
#[](index) ⇒ Object
9 10 11 12 |
# File 'lib/waiter/menu/item_list.rb', line 9 def [](index) return detect{ |item| item.name == index } if index.is_a? Symbol super end |
#include?(other) ⇒ Boolean
4 5 6 7 |
# File 'lib/waiter/menu/item_list.rb', line 4 def include?(other) return map(&:name).include?(other) if other.is_a? Symbol super end |
#names ⇒ Object
14 15 16 |
# File 'lib/waiter/menu/item_list.rb', line 14 def names map(&:name) end |