Method: JSON::Editor::EditMenu#create

Defined in:
lib/json/editor.rb

#createObject

Create the menu.



644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/json/editor.rb', line 644

def create
  title = MenuItem.new('Edit')
  title.submenu = menu
  add_item('Copy', ?c, &method(:copy))
  add_item('Paste', ?v, &method(:paste))
  add_separator
  add_item('Find', ?f, &method(:find))
  add_item('Find Again', ?g, &method(:find_again))
  add_separator
  add_item('Sort', ?S, &method(:sort))
  title
end