Class: Runbook::Statement
- Includes:
- Hooks::Invoker
- Defined in:
- lib/runbook/statement.rb
Direct Known Subclasses
Runbook::Statements::Ask, Runbook::Statements::Assert, Runbook::Statements::Capture, Runbook::Statements::CaptureAll, Runbook::Statements::Command, Runbook::Statements::Confirm, Runbook::Statements::Description, Runbook::Statements::Download, Runbook::Statements::Layout, Runbook::Statements::Note, Runbook::Statements::Notice, Runbook::Statements::RubyCommand, Runbook::Statements::TmuxCommand, Runbook::Statements::Upload, Runbook::Statements::Wait
Instance Attribute Summary
Attributes inherited from Node
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 |