Class: Itamae::Recipe::RecipeFromDefinition

Inherits:
Itamae::Recipe show all
Defined in:
lib/itamae/recipe.rb

Constant Summary

Constants inherited from Itamae::Recipe

NotFoundError

Instance Attribute Summary collapse

Attributes inherited from Itamae::Recipe

#children, #delayed_notifications, #path, #runner

Instance Method Summary collapse

Methods inherited from Itamae::Recipe

#dir, find_recipe_in_gem, #initialize, #run

Constructor Details

This class inherits a constructor from Itamae::Recipe

Instance Attribute Details

#definitionObject

Returns the value of attribute definition.



129
130
131
# File 'lib/itamae/recipe.rb', line 129

def definition
  @definition
end

Instance Method Details

#load(vars = {}) ⇒ Object



131
132
133
134
# File 'lib/itamae/recipe.rb', line 131

def load(vars = {})
  context = EvalContext.new(self, vars)
  context.instance_eval(&@definition.class.definition_block)
end