class PuppetStrings::Yard::CodeObjects::Group

Implements the base class for “groups”.

A group behaves like a YARD namespace object, but displays differently in the HTML output.

Public Class Methods

instance(key) click to toggle source

Gets the singleton instance of the group. @param [Symbol] key The key to lookup the group for. @return Returns the singleton instance of the group.

# File lib/puppet-strings/yard/code_objects/group.rb, line 10
def self.instance(key)
  instance = P(:root, key)
  return instance unless instance.is_a?(YARD::CodeObjects::Proxy)
  instance = self.new(:root, key)
  instance.visibility = :hidden
  P(:root).children << instance
  instance
end

Public Instance Methods

path() click to toggle source

Gets the path to the group. @return [String] Returns the path to the group.

# File lib/puppet-strings/yard/code_objects/group.rb, line 21
def path
  @name.to_s
end
type() click to toggle source

Gets the type of the group. @return [Symbol] Returns the type of the group.

# File lib/puppet-strings/yard/code_objects/group.rb, line 27
def type
  @name
end