Class: NodeMutation::Helper
- Inherits:
-
Object
- Object
- NodeMutation::Helper
- Defined in:
- lib/node_mutation/helper.rb
Class Method Summary collapse
-
.iterate_actions(actions, &block) ⇒ Object
It iterates over all actions, and calls the given block with each action.
Class Method Details
.iterate_actions(actions, &block) ⇒ Object
It iterates over all actions, and calls the given block with each action.
5 6 7 8 9 10 11 12 13 |
# File 'lib/node_mutation/helper.rb', line 5 def self.iterate_actions(actions, &block) actions.each do |action| if action.is_a?(NodeMutation::GroupAction) iterate_actions(action.actions, &block) else block.call(action) end end end |