Class: Runbook::Statement

Inherits:
Node
  • Object
show all
Includes:
Hooks::Invoker
Defined in:
lib/runbook/statement.rb

Instance Attribute Summary

Attributes inherited from Node

#parent

Instance Method Summary collapse

Methods included from Hooks::Invoker

#_execute_after_hooks, #_execute_around_hooks, #_execute_before_hooks, #invoke_with_hooks

Methods inherited from Node

#dynamic!, #dynamic?, #initialize, #parent_entity, #visited!, #visited?

Constructor Details

This class inherits a constructor from Runbook::Node

Instance Method Details

#render(view, output, metadata) ⇒ Object



5
6
7
8
9
# File 'lib/runbook/statement.rb', line 5

def render(view, output, )
  invoke_with_hooks(view, self, output, ) do
    view.render(self, output, )
  end
end

#run(run, metadata) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/runbook/statement.rb', line 11

def run(run, )
  return if dynamic? && visited?

  invoke_with_hooks(run, self, ) do
    run.execute(self, )
  end
  self.visited!
end