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 collapse
-
#parent ⇒ Object
Returns the value of attribute 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, #visited!, #visited?
Constructor Details
This class inherits a constructor from Runbook::Node
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/runbook/statement.rb', line 5 def parent @parent end |
Instance Method Details
#render(view, output, metadata) ⇒ Object
7 8 9 10 11 |
# File 'lib/runbook/statement.rb', line 7 def render(view, output, ) invoke_with_hooks(view, self, output, ) do view.render(self, output, ) end end |
#run(run, metadata) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/runbook/statement.rb', line 13 def run(run, ) return if dynamic? && visited? invoke_with_hooks(run, self, ) do run.execute(self, ) end self.visited! end |