Class: PuppetStrings::Yard::CodeObjects::Group
- Inherits:
-
Base
- Object
- YARD::CodeObjects::NamespaceObject
- Base
- PuppetStrings::Yard::CodeObjects::Group
- Defined in:
- lib/puppet-strings/yard/code_objects/group.rb
Overview
Implements the base class for “groups”.
A group behaves like a YARD namespace object, but displays differently in the HTML output.
Direct Known Subclasses
Classes, DataTypeAliases, DataTypes, DefinedTypes, Functions, Plans, Providers, Tasks, Types
Class Method Summary collapse
-
.instance(key) ⇒ Object
Gets the singleton instance of the group.
Instance Method Summary collapse
-
#path ⇒ String
Gets the path to the group.
-
#type ⇒ Symbol
Gets the type of the group.
Methods inherited from Base
Class Method Details
.instance(key) ⇒ Object
Gets the singleton instance of the group.
12 13 14 15 16 17 18 19 20 |
# File 'lib/puppet-strings/yard/code_objects/group.rb', line 12 def self.instance(key) instance = P(:root, key) return instance unless instance.is_a?(YARD::CodeObjects::Proxy) instance = new(:root, key) instance.visibility = :hidden P(:root).children << instance instance end |
Instance Method Details
#path ⇒ String
Gets the path to the group.
24 25 26 |
# File 'lib/puppet-strings/yard/code_objects/group.rb', line 24 def path @name.to_s end |
#type ⇒ Symbol
Gets the type of the group.
30 31 32 |
# File 'lib/puppet-strings/yard/code_objects/group.rb', line 30 def type @name end |