Class: YARD::CodeObjects::Chef::CookbookObject
- Inherits:
-
ChefObject
- Object
- NamespaceObject
- ChefObject
- YARD::CodeObjects::Chef::CookbookObject
- Defined in:
- lib/yard-chefdoc/code_objects/cookbook.rb
Overview
A CookbookObject represents a Chef cookbook. See wiki.opscode.com/display/chef/Cookbooks for more information about cookbooks.
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Cookbook metadata.
-
#docstring_type ⇒ Object
Returns the value of attribute docstring_type.
-
#gems ⇒ Object
Returns the value of attribute gems.
-
#issues_url ⇒ Object
Returns the value of attribute issues_url.
-
#license ⇒ Object
Returns the value of attribute license.
-
#maintainer ⇒ Object
Returns the value of attribute maintainer.
-
#maintainer_email ⇒ Object
Returns the value of attribute maintainer_email.
-
#platforms ⇒ Object
Returns the value of attribute platforms.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from ChefObject
Instance Method Summary collapse
-
#initialize(namespace, name) ⇒ CookbookObject
constructor
Creates a new CookbookObject instance.
-
#libraries ⇒ Array
Libraries defined in the cookbook.
- #metadata ⇒ Object
Methods inherited from ChefObject
#chef_init, #children_by_type, #find_description_in, #find_header_in, register, register_element
Constructor Details
#initialize(namespace, name) ⇒ CookbookObject
Creates a new CookbookObject instance. belongs
32 33 34 35 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 32 def initialize(namespace, name) super(namespace, name) @docstring_type = :markdown end |
Instance Attribute Details
#dependencies ⇒ Object
Cookbook metadata
15 16 17 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 15 def dependencies @dependencies end |
#docstring_type ⇒ Object
Returns the value of attribute docstring_type.
12 13 14 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 12 def docstring_type @docstring_type end |
#gems ⇒ Object
Returns the value of attribute gems.
23 24 25 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 23 def gems @gems end |
#issues_url ⇒ Object
Returns the value of attribute issues_url.
18 19 20 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 18 def issues_url @issues_url end |
#license ⇒ Object
Returns the value of attribute license.
21 22 23 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 21 def license @license end |
#maintainer ⇒ Object
Returns the value of attribute maintainer.
19 20 21 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 19 def maintainer @maintainer end |
#maintainer_email ⇒ Object
Returns the value of attribute maintainer_email.
20 21 22 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 20 def maintainer_email @maintainer_email end |
#platforms ⇒ Object
Returns the value of attribute platforms.
22 23 24 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 22 def platforms @platforms end |
#source_url ⇒ Object
Returns the value of attribute source_url.
17 18 19 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 17 def source_url @source_url end |
#version ⇒ Object
Returns the value of attribute version.
16 17 18 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 16 def version @version end |
Instance Method Details
#libraries ⇒ Array
Libraries defined in the cookbook. Catches all classes, modules and defintion directly defined without a namespace
42 43 44 45 46 47 48 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 42 def libraries modules = YARD::Registry.all(:module) classes = YARD::Registry.all(:class) root_definitions = YARD::Registry.all(:method).select { |m| m.path =~ /^root#/ } classes + modules + root_definitions end |
#metadata ⇒ Object
50 51 52 |
# File 'lib/yard-chefdoc/code_objects/cookbook.rb', line 50 def [@version, @maintainer, @dependencies] end |