Class: YARD::CodeObjects::Chef::RecipeObject

Inherits:
ChefObject
  • Object
show all
Defined in:
lib/yard-chef/code_objects/recipe_object.rb

Overview

A RecipeObject represents a recipe in a chef cookbook. See docs.opscode.com/essentials_cookbook_recipes.html

Instance Attribute Summary

Attributes inherited from ChefObject

#docstring_type

Instance Method Summary collapse

Methods inherited from ChefObject

#children_by_type, #cookbooks, register, register_element

Constructor Details

#initialize(namespace, name) ⇒ RecipeObject

Creates a new instance of RecipeObject.

Parameters:

  • namespace (NamespaceObject)

    namespace to which the recipe belongs

  • name (String)

    name of the recipe



39
40
41
42
# File 'lib/yard-chef/code_objects/recipe_object.rb', line 39

def initialize(namespace, name)
  super(namespace, name)
  @short_desc = ''
end

Instance Method Details

#nameString

Prefixes recipe name with the name of the cookbook.

Returns:

  • (String)

    recipe name



48
49
50
# File 'lib/yard-chef/code_objects/recipe_object.rb', line 48

def name
  parent.name.to_s << '::' << @name.to_s
end