Class: Itamae::Recipe::RecipeFromDefinition
- Inherits:
-
Recipe
- Object
- Recipe
- Itamae::Recipe::RecipeFromDefinition
- Defined in:
- lib/itamae/recipe.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
Instance Method Summary collapse
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
174 175 176 |
# File 'lib/itamae/recipe.rb', line 174 def definition @definition end |
Instance Method Details
#load(vars = {}) ⇒ Object
176 177 178 179 |
# File 'lib/itamae/recipe.rb', line 176 def load(vars = {}) context = EvalContext.new(self, vars) context.instance_eval(&@definition.class.definition_block) end |
#run ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/itamae/recipe.rb', line 181 def run if @definition.do_not_run_because_of_only_if? Itamae.logger.debug "#{@definition.resource_type}[#{@definition.resource_name}] Execution skipped because of only_if attribute" return elsif @definition.do_not_run_because_of_not_if? Itamae.logger.debug "#{@definition.resource_type}[#{@definition.resource_name}] Execution skipped because of not_if attribute" return end super end |