Skip to content
matthewcalebsmith edited this page Sep 29, 2011 · 3 revisions

Welcome to the openmenu wiki!

openmenu is fairly simple to use.

First, parse a file using OpenMenu.

om = OpenMenu.parse(open('http://openmenu.com/menu/sample'))

From here you basically can use the OpenMenu Specification to guide you.

om.restaurant_name # => 'My Restaurant'
om.menus.inspect # => [#<OpenMenu::Menu:0x007fdb0a1facd8 @name="Main Menu", ...>, #<OpenMenu::Menu:0x007fdb0c027558 @name="Late Night Menu", ...>]
om.menus.first.groups.first.items.first.name # => 'Coconut Shrimp'
om.menus.first.groups.first.items.first.price # => 7.95

The next release will have greater documentation coverage. And it will be coming soon (VERSION=0.1.7).

Clone this wiki locally