Parent

Included Modules

Files

JSON::Editor::OptionsMenu

Attributes

pretty_item[R]

Public Instance Methods

collapsed_nodes(item) click to toggle source

Collapse/Expand all nodes by default.

     # File lib/json/editor.rb, line 663
663:       def collapsed_nodes(item)
664:         if expanded
665:           self.expanded = false
666:           collapse_all
667:         else
668:           self.expanded = true
669:           expand_all 
670:         end
671:       end
create() click to toggle source

Create the menu.

     # File lib/json/editor.rb, line 682
682:       def create
683:         title = MenuItem.new('Options')
684:         title.submenu = menu
685:         add_item('Collapsed nodes', nil, CheckMenuItem, &method(:collapsed_nodes))
686:         @pretty_item = add_item('Pretty saving', nil, CheckMenuItem,
687:           &method(:pretty_saving))
688:         @pretty_item.active = true
689:         window.unchange
690:         title
691:       end
pretty_saving(item) click to toggle source

Toggle pretty saving mode on/off.

     # File lib/json/editor.rb, line 674
674:       def pretty_saving(item)
675:         @pretty_item.toggled
676:         window.change
677:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.