Class: YARD::CodeObjects::Chef::DependencyObject

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

Overview

A DependencyObject represents a dependencies of a chef cookbook.

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) ⇒ DependencyObject

Creates a new instance of DependencyObject.

Parameters:

  • namespace (NamespaceObject)

    namespace to which the recipe belongs

  • name (String)

    name of the recipe



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

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

Instance Method Details

#nameString

Prefixes dependency name with the name of the cookbook.

Returns:

  • (String)

    recipe name



47
48
49
# File 'lib/yard-chef/code_objects/dependency_object.rb', line 47

def name
  @name.to_s
end