Class: Lightchef::Runner
- Inherits:
-
Object
- Object
- Lightchef::Runner
- Extended by:
- SpecInfra::Helper::Backend, SpecInfra::Helper::DetectOS
- Defined in:
- lib/lightchef/runner.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#node ⇒ Object
Returns the value of attribute node.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(backend) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(backend) ⇒ Runner
Returns a new instance of Runner.
34 35 36 |
# File 'lib/lightchef/runner.rb', line 34 def initialize(backend) @backend = backend end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
31 32 33 |
# File 'lib/lightchef/runner.rb', line 31 def backend @backend end |
#node ⇒ Object
Returns the value of attribute node.
32 33 34 |
# File 'lib/lightchef/runner.rb', line 32 def node @node end |
Class Method Details
.new_from_options(options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lightchef/runner.rb', line 9 def self.() self.new(backend_for(:exec)).tap do |runner| node = if [:node_json] node_json_path = File.([:node_json]) Logger.debug "Loading node data from #{node_json_path} ..." Node.new_from_file(node_json_path) else Node.new end runner.node = node end end |