Parent

Included Modules

Class/Module Index [+]

Quicksearch

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
def collapsed_nodes(item)
  if expanded
    self.expanded = false
    collapse_all
  else
    self.expanded = true
    expand_all 
  end
end
create() click to toggle source

Create the menu.

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

Toggle pretty saving mode on/off.

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.