Class: YARD::CodeObjects::Chef::CookbookObject
- Inherits:
-
ChefObject
- Object
- YARD::CodeObjects::ClassObject
- ChefObject
- YARD::CodeObjects::Chef::CookbookObject
- Defined in:
- lib/yard-chef/code_objects/cookbook_object.rb
Overview
A CookbookObject represents a Chef cookbook. See wiki.opscode.com/display/chef/Cookbooks for more information about cookbook.
Instance Attribute Summary collapse
-
#providers ⇒ Array<ProviderObject>
readonly
Lightweight providers implemented in the cookbook.
-
#resources ⇒ Array<ResourceObject>
readonly
Lightweight resources implemented in the cookbook.
-
#short_desc ⇒ String
Short description for the cookbook.
-
#version ⇒ String
Version of the cookbook.
Attributes inherited from ChefObject
Instance Method Summary collapse
-
#attributes ⇒ Array<AttributeObject>
Attributes implemented in the cookbook.
-
#definitions ⇒ Array<MethodObject>
Definitions implemented in the cookbook.
-
#dependencies ⇒ Array<MethodObject>
Dependencies of the cookbook.
-
#initialize(namespace, name) ⇒ CookbookObject
constructor
Creates a new CookbookObject instance.
-
#libraries ⇒ Array<ModuleObject>
Libraries defined in the cookbook.
-
#recipes ⇒ Array<RecipeObject>
Recipes implemented in the cookbook.
Methods inherited from ChefObject
#children_by_type, #cookbooks, register, register_element
Constructor Details
#initialize(namespace, name) ⇒ CookbookObject
Creates a new CookbookObject instance. belongs
68 69 70 71 72 73 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 68 def initialize(namespace, name) super(namespace, name) @resources = [] @providers = [] @libraries = [] end |
Instance Attribute Details
#providers ⇒ Array<ProviderObject> (readonly)
Lightweight providers implemented in the cookbook.
59 60 61 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 59 def providers @providers end |
#resources ⇒ Array<ResourceObject> (readonly)
Lightweight resources implemented in the cookbook.
53 54 55 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 53 def resources @resources end |
#short_desc ⇒ String
Short description for the cookbook.
39 40 41 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 39 def short_desc @short_desc end |
#version ⇒ String
Version of the cookbook.
47 48 49 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 47 def version @version end |
Instance Method Details
#attributes ⇒ Array<AttributeObject>
Attributes implemented in the cookbook.
87 88 89 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 87 def attributes children_by_type(:attribute) end |
#definitions ⇒ Array<MethodObject>
Definitions implemented in the cookbook.
95 96 97 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 95 def definitions children_by_type(:method) end |
#dependencies ⇒ Array<MethodObject>
Dependencies of the cookbook.
103 104 105 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 103 def dependencies children_by_type(:dependency) end |
#libraries ⇒ Array<ModuleObject>
Libraries defined in the cookbook.
111 112 113 114 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 111 def libraries modules = YARD::Registry.all(:module) modules.select { |lib| lib.file.split('/').include?(@name.to_s) } end |
#recipes ⇒ Array<RecipeObject>
Recipes implemented in the cookbook.
79 80 81 |
# File 'lib/yard-chef/code_objects/cookbook_object.rb', line 79 def recipes children_by_type(:recipe) end |