class Confer::Recipe
Public: Encapsulates a recipe. Usually instantiated by calling a method from a mixed in module such as ‘Confer::Recipe::Yaml`.
Attributes
steps[R]
Public: An Array
of steps this recipe contains.
Public Class Methods
from_array(array)
click to toggle source
from_file(path)
click to toggle source
Public: Loads a recipe from a YAML file.
path - A String containing the path to the YAML file to load.
Returns a Recipe
instance.
# File lib/confer/recipe.rb, line 22 def self.from_file(path) self.from_array YAML.load File.open(path, 'r').read rescue Errno::ENOENT => e raise RecipeNotFoundError.new(e) rescue Psych::SyntaxError => e raise RecipeSyntaxError.new(e) end