Class: SWT::ConditionalCommand
- Inherits:
-
ContainerTreeCommand
- Object
- TreeCommand
- ContainerTreeCommand
- SWT::ConditionalCommand
- Defined in:
- lib/swt.rb
Instance Method Summary collapse
-
#initialize(parent, exp) ⇒ ConditionalCommand
constructor
A new instance of ConditionalCommand.
- #invoke(stack) ⇒ Object
Methods inherited from ContainerTreeCommand
Methods inherited from TreeCommand
Constructor Details
#initialize(parent, exp) ⇒ ConditionalCommand
Returns a new instance of ConditionalCommand.
199 200 201 202 |
# File 'lib/swt.rb', line 199 def initialize(parent,exp) super(parent) @exp=exp end |
Instance Method Details
#invoke(stack) ⇒ Object
203 204 205 206 |
# File 'lib/swt.rb', line 203 def invoke(stack) condition=@exp.call stack.last.getData("object") super if condition end |