Method: RSpecSystem::Node.node_from_yaml

Defined in:
lib/rspec-system/node.rb

.node_from_yaml(nodeset, k, v, custom_prefabs_path) ⇒ RSpecSystem::Node

Static helper for generating a node direct from the hash returned by the nodeset YAML file.

Parameters:

  • nodeset (RSpecSystem::Node)

    nodeset that this node belongs to

  • k (String)

    name of node

  • v (Hash<String,String>)

    hash configuration as given from the nodeset yaml file

  • custom_prefabs_path (String)

    path of custom prefabs yaml file

Returns:



16
17
18
19
20
21
22
23
# File 'lib/rspec-system/node.rb', line 16

def self.node_from_yaml(nodeset, k, v, custom_prefabs_path)
  RSpecSystem::Node.new(
    :nodeset => nodeset,
    :custom_prefabs_path => custom_prefabs_path,
    :name => k,
    :prefab => v['prefab']
  )
end