class PropertyGrid::APropertyGrid
Class defining the property grid A property grid consists of property groups, and groups contain properties.
Attributes
groups[RW]
Public Class Methods
new()
click to toggle source
# File lib/property_grid.rb, line 95 def initialize @groups = [] end
Public Instance Methods
add_group(name) { |group| ... }
click to toggle source
Give a group name, creates a group, yielding to a block that can be used to define properties within the group, and returning self so that additional groups can be added in a fluid code style.
# File lib/property_grid.rb, line 102 def add_group(name) group = PropertyGridGroup.new group.name = name @groups << group yield(group) # yields to block creating group properties self # returns the PropertyGrid instance end