Class: SWT::ContainerTreeCommand
Instance Method Summary
collapse
Methods inherited from TreeCommand
#stacktrace
Constructor Details
Returns a new instance of ContainerTreeCommand.
59
60
61
62
|
# File 'lib/swt.rb', line 59
def initialize(parent)
super(parent)
@children=[]
end
|
Instance Method Details
#accept(child) ⇒ Object
63
64
65
66
|
# File 'lib/swt.rb', line 63
def accept(child)
@children << child
child
end
|
#invoke(stack) ⇒ Object
67
68
69
|
# File 'lib/swt.rb', line 67
def invoke(stack)
@children.each { |x| x.invoke stack}
end
|
#to_s ⇒ Object
70
71
72
|
# File 'lib/swt.rb', line 70
def to_s
"#{self.class} ([#{@children.join ','}])"
end
|