Method: JSON::Editor::FileMenu#create
- Defined in:
- lib/json/editor.rb
#create ⇒ Object
Create the menu.
492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/json/editor.rb', line 492 def create title = MenuItem.new('File') title. = add_item('New', &method(:new)) add_item('Open', &method(:open)) add_item('Revert', &method(:revert)) add_separator add_item('Save', &method(:save)) add_item('Save As', &method(:save_as)) add_separator add_item('Quit', &method(:quit)) title end |