Class: Promote::NodeShell::BaseShell
- Inherits:
-
Object
- Object
- Promote::NodeShell::BaseShell
- Defined in:
- lib/promote/node_shell/base_shell.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#vault ⇒ Object
Returns the value of attribute vault.
Instance Method Summary collapse
- #converge?(ui = nil) ⇒ Boolean
- #execute(command, ui = nil) ⇒ Object
-
#initialize(node, vault) ⇒ BaseShell
constructor
A new instance of BaseShell.
Constructor Details
#initialize(node, vault) ⇒ BaseShell
Returns a new instance of BaseShell.
4 5 6 7 |
# File 'lib/promote/node_shell/base_shell.rb', line 4 def initialize(node, vault) @node = node @vault = vault end |
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node.
10 11 12 |
# File 'lib/promote/node_shell/base_shell.rb', line 10 def node @node end |
#vault ⇒ Object
Returns the value of attribute vault.
9 10 11 |
# File 'lib/promote/node_shell/base_shell.rb', line 9 def vault @vault end |
Instance Method Details
#converge?(ui = nil) ⇒ Boolean
12 13 14 |
# File 'lib/promote/node_shell/base_shell.rb', line 12 def converge?(ui = nil) execute('chef-client', ui) == 0 end |
#execute(command, ui = nil) ⇒ Object
16 17 |
# File 'lib/promote/node_shell/base_shell.rb', line 16 def execute(command, ui = nil) end |